home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d8 / mskrt310.arc / MSKERM.DOC < prev    next >
Text File  |  1991-03-20  |  336KB  |  6,685 lines

  1.  
  2.                            MS-DOS KERMIT USER GUIDE
  3.  
  4.  
  5.          FOR THE IBM PC FAMILY, COMPATIBLES, AND OTHER MS-DOS SYSTEMS
  6.  
  7.  
  8.                                VERSION 2.32/A
  9.  
  10.  
  11.                             C. Gianone, F. da Cruz
  12.  
  13.               Columbia University Center for Computing Activities
  14.                            New York, New York 10027
  15.  
  16.  
  17.                                  J.R. Doupnik
  18.  
  19.               CASS and EE, Utah State University, Logan, UT 84322
  20.  
  21.  
  22.                                January 24, 1989
  23.  
  24.  
  25.  
  26.                             Copyright (C) 1981,1988
  27.             Trustees of Columbia University in the City of New York
  28.  
  29.      Permission is granted to any individual or institution to use, copy,
  30.     or redistribute this document so long as it is not sold for profit, and
  31.                   provided this copyright notice is retained.
  32. 1. MS-DOS KERMIT
  33.  
  34. --------
  35. This  document  is  formatted  as an ordinary, plain text ASCII disk file, from
  36. SCRIBE text formatter source.   Typeset  copies  are  available  from  Columbia
  37. University.
  38. --------
  39.  
  40. Program:        Joe  R.  Doupnik (Utah State University), with contributions by
  41.                 James  Harvey  (Indiana/Purdue  University),  James  Sturdevant
  42.                 (A.C.  Nielson Company), and many others.  Originally by Daphne
  43.                 Tzoar and Jeff Damens (Columbia University).  See History.
  44.  
  45. Language:       Microsoft Macro Assembler (MASM)
  46.  
  47. Version:        2.32/A
  48.  
  49. Released:       January 24, 1989.
  50. Documentation:  Christine Gianone, Frank da Cruz (Columbia University),
  51.                 Joe R. Doupnik (Utah State University)
  52.  
  53. Dedicated To:   Peppi
  54.  
  55.  
  56. Kermit-MS Capabilities At A Glance:
  57.  
  58.    Local operation:                Yes
  59.    Remote operation:               Yes
  60.    Transfers text files:           Yes
  61.    Transfers binary files:         Yes
  62.    Wildcard send:                  Yes
  63.    File transfer interruption:     Yes
  64.    Filename collision avoidance:   Yes
  65.    Can time out:                   Yes
  66.    8th-bit prefixing:              Yes
  67.    Repeat count compression:       Yes
  68.    Alternate block check types:    Yes
  69.    Terminal emulation:             VT102, H19, VT52, Tektronix 4010
  70.    Communication settings:         Speed, Parity, Flow Control, Echo
  71.    Transmit BREAK:                 Yes (and Long BREAK)
  72.    IBM mainframe communication:    Yes
  73.    Transaction logging:            Yes
  74.    Session logging (raw download): Yes
  75.    Raw upload:                     Yes
  76.    Act as server:                  Yes
  77.    Talk to server:                 Yes
  78.    Advanced server functions:      Yes
  79.    Advanced commands for servers:  Yes
  80.    Local file management:          Yes
  81.    Command/init files:             Yes
  82.    Command macros:                 Yes
  83.    Extended-length packets:        Yes
  84.    Local area networks:            Yes (NetBIOS and other support)
  85.    MS-Windows compatibility:       Yes
  86.    Attribute packets:              Yes
  87.    Sliding windows:                No
  88.  
  89. MS-DOS Kermit, or "Kermit-MS" (or MS-Kermit), is a program that implements  the
  90. Kermit  file transfer protocol for the entire IBM PC family, including the PS/2
  91. series, IBM compatibles, and several other machines based  on  the  Intel  8086
  92. processor  series (8088, 80286, 80386, etc) and the DOS operating system family
  93. (PC-DOS or MS-DOS, henceforth referred to  collectively  as  MS-DOS  or  simply
  94. DOS).
  95.  
  96. It  is  assumed  you are acquainted with your PC and with DOS, and that you are
  97. familiar with the general ideas of data communication and Kermit file transfer.
  98. A very brief overview is given here, but for details consult the early chapters
  99. of the Kermit User Guide (of which this document is a  chapter),  or  the  book
  100. Kermit, A File Transfer Protocol, by Frank da Cruz, Digital Press (1987), order
  101. number EY-6705E-DP  (phone  1-800-343-8321),  which  also  includes  background
  102. tutorials on computers, file systems, and data communication (including modems,
  103. cabling, etc).  For further information about  Kermit  documentation,  updates,
  104. lists of current available versions, and ordering information, write to:
  105.     Kermit Distribution
  106.     Columbia University Center for Computing Activities
  107.     612 West 115th Street
  108.     New York, NY  10025  (USA)
  109.  
  110.  
  111. 1.1. System Requirements
  112.  
  113. Kermit-MS version 2.32 runs in as little as 100K of memory,  but will occupy up
  114. to 160K or so if it can be  found  for  extra  screen  rollback  memory,  macro
  115. definitions,  etc.   Versions not using screen rollback memory will not require
  116. the additional space.  It will also try to leave 24 Kbytes free  for  a  second
  117. copy of COMMAND.COM which is needed for execution of certain commands.
  118.  
  119. On  the IBM PC family, Kermit-MS 2.32 performs almost complete emulation of the
  120. DEC VT-102 and Heath/Zenith-19  terminals  at  speeds  up  to  19,200  baud  or
  121. greater, lacking only the VT102's smooth scrolling and (on most display boards)
  122. 132 column features.  And as of version 2.30, Kermit-MS also performs Tektronix
  123. 4010/4014  graphics  terminal  emulation on IBM PC family systems equipped with
  124. CGA, EGA, or other graphics adapters, with either color or monochrome monitors.
  125.  
  126. Much of Kermit's speed is accomplished by direct writes to screen  memory,  but
  127. this  is done in a "TopView-aware" manner to allow successful operation in win-
  128. dowing environments like MS-Windows, DesqView, and TopView itself.    Speed  is
  129. also due to direct access of the serial port 8250  UART (Universal Asynchronous
  130. Receiver/Transmitter) chip, with buffered, interrupt-driven receipt of  charac-
  131. ters  and selectable XON/XOFF  flow control.  Full speed 9600 baud operation is
  132. possible on 4.77Mhz systems without flow control, but flow control is  required
  133. on  these  systems  for 19,200 baud or higher rates.  The IBM PC version should
  134. also run on near-clones like the DG/1 that differ from true PCs only  in  their
  135. choice   of  UART;  non-8250  UARTs  are  detected  automatically,  and  slower
  136. non-interrupt driven Bios serial port i/o is used, in which case the top  speed
  137. is in the 1200 baud range.
  138.  
  139. Kermit-MS 2.32 runs on the entire IBM PC family (the PC, XT, AT, PCjr, Portable
  140. PC, PC Convertible, PS/2) and compatibles (Compaq,  VAXmate,  Z150,  etc),  and
  141. there are also specially tailored versions for non-IBM-compatibles like the DEC
  142. Rainbow, HP-110, HP-150, HP Portable Plus, Grid Compass II,  Victor  9000,  and
  143. others, plus a "generic DOS" version that should run (slowly) on any 8086-based
  144. MS-DOS machine.  This document concentrates on the IBM  version;  some  of  the
  145. system-dependent capabilities described here may be lacking in the non-IBM ver-
  146. sions.  See section 1.11 for features of different systems.
  147.  
  148. KERMIT.EXE for the IBM PC family occupies  about  102K  of  disk  storage  (the
  149. figure  will vary for other versions).  This can be reduced by about 15K if you
  150. run it through EXEPACK.  MS-Kermit is not distributed in packed  form,  because
  151. problems  have  been  reported on certain systems when this is done.  So if you
  152. decide to pack it, make sure to keep an unpacked version available to fall back
  153. to in case of problems.
  154.  
  155.  
  156. 1.2. History
  157.  
  158. Over  the  years,  MS-Kermit has grown from a Kermit file transfer program that
  159. embodied a simple terminal emulator into a complex and  powerful  communication
  160. program that includes the Kermit file transfer protocol.  As a result, the bulk
  161. of this manual is devoted to the communication  features,  rather  than  Kermit
  162. protocol operation.  Skip ahead to the next section if you're not interested in
  163. the history of MS-Kermit.
  164.  
  165. MS-DOS Kermit (like the Kermit file transfer protocol itself) is a  product  of
  166. the  Systems  Group of the Columbia University Center for Computing Activities,
  167. and it was one of the four original Kermit programs (with the CP/M, DEC-20, and
  168. IBM  mainframe versions).  It was initially written for the IBM PC with DOS 1.1
  169. by Daphne Tzoar in 1981-1982, based largely on Bill Catchings's  original  CP/M
  170. 8080  assembler version.  PC-Kermit (as it was called then) provided basic Ker-
  171. mit file transfer and VT52 emulation.  Joellen Windsor  of  the  University  of
  172. Arizona  added  conditional  assembly  support for the Heath/Zenith-100 shortly
  173. thereafter, and soon after that Dave King of Carnegie-Mellon  University  added
  174. Heath-19  terminal emulation, and some patches to let the program run under the
  175. new DOS version, 2.0.  During this era, the program version numbers  went  from
  176. 1.0 to 1.20.
  177.  
  178. With  the  appearance  in the marketplace of many new MS-DOS machines that were
  179. not compatible with the IBM PC, it became apparent that conditionally assembled
  180. code  supporting  each of these machines within a single monolithic source file
  181. was not the best way to organize the program.   Therefore  Daphne,  along  with
  182. Jeff  Damens of Columbia, undertook to reorganize the program in a modular way,
  183. isolating system dependencies into separate files.    The  result  was  version
  184. 2.26,  released  in  July  1984.   It included support for the DEC Rainbow, the
  185. HP-150, the Wang PC, and generic MS-DOS, as well as for the IBM PC  family  and
  186. the  H/Z-100.  It also included many new features, like 8th-bit prefixing (code
  187. contributed by The Source  Telecomputing),  alternate  block  check  selection,
  188. byte-count  compression,  server/client operation, access to local file and DOS
  189. operations, command macros, initialization and command files, screen  rollback,
  190. key  redefinition,  and  more.    For  the  2.26 release, the executable Kermit
  191. programs were encoded printably as ".BOO" files, designed by Bill Catchings  as
  192. part of this effort, for network and electronic-mail distribution.
  193.  
  194. Release 2.27 was produced by Daphne and Jeff in December 1984.  Unlike 2.26, it
  195. ran correctly on the new PC/AT under DOS 3.0, and included support for the  NEC
  196. APC  from  Ron  Blanford  of  Seattle, WA, and Ian Gibbons of the University of
  197. Hawaii, and for the TI Professional from Joe Smith of the  Colorado  School  of
  198. Mines,  plus  some bug fixes and reorganization.  2.27 is the last version that
  199. runs under pre-2.0 versions of DOS.
  200.  
  201. Version 2.28 (Daphne, Jeff, June  1985)  added  dynamic  memory  allocation  to
  202. reduce  disk  storage for the .EXE file, and to allow the program to adjust it-
  203. self to the PC's memory size, plus the inevitable bug fixes (many of them  con-
  204. tributed  by  Edgar  Butt  of the University of Maryland and Gregg Small of the
  205. University of California at Berkeley).  During this  period,  support  for  ad-
  206. ditional MS-DOS systems was added by various people.
  207.  
  208. In  December 1985, a tape showed up at Columbia sent by Prof. Joe R. Doupnik of
  209. the Center for Atmospheric and Space Studies and EE Department  at  Utah  State
  210. University.  This tape contained version 2.28 modified to fully support the DOS
  211. 2.0 file system, and to which many new features had  been  added,  notably  the
  212. ability  of  the  MS-DOS Kermit server to process various REMOTE commands (DIR,
  213. CWD, SPACE, etc).  And at about the same time, a tape arrived from James Harvey
  214. of  Indiana/Purdue University, who had changed Kermit's CONNECT command to emu-
  215. late the popular DEC VT100 terminal.  James's material was  sent  to  Joe,  who
  216. then laboriously fitted the VT100 emulation into his own code, keeping the VT52
  217. and H19 emulation alive as options, and upgrading the VT100 emulation to  VT102
  218. by  adding  features  such  as  line and character insertion and deletion.  The
  219. result was version 2.29, released in May 1986.
  220.  
  221. Soon after the release of 2.29, some disks were sent in by James Sturdevant  of
  222. the A.C. Nielson Company, containing a full implementation of the Kermit script
  223. facility, as described in the Kermit book.  This material was sent to Joe,  who
  224. had by now become keeper of MS-DOS Kermit and had already begun work on version
  225. 2.30 by adding support for extended-length packets.  Joe had been  carrying  on
  226. voluminous  network  correspondence  (Thanks,  BITNET!)  with Columbia and with
  227. MS-DOS Kermit users and testers all over the world, giving birth  to  many  new
  228. features,  including  Tektronix graphics terminal emulation, support for opera-
  229. tion over local area networks, support for 8-bit ASCII terminal connections and
  230. international  character  sets,  ANSI  printer  control, and a redesigned, more
  231. powerful, more portable key redefinition mechanism.
  232.  
  233. Version 2.30 was formally released on January 1, 1988, after many  "alpha"  and
  234. "beta"  tests.    Among the many contributors to this version were Brian Holley
  235. and Joe Smith for the Tektronix emulation, Robert Goeke for the  NEC  AP3  sup-
  236. port,  Brian  Peterson  and Andreas Stumpf for the Victor 9000, Bob Babcock and
  237. Joe White for the Sanyos, Christopher Lent for the Wang PC, Jack Bryans for  an
  238. Intel  iRMX  version, Jim Noble for the Grid Compass, Geoff Mulligan and others
  239. for the Zenith 100, and David Knoell for the  special  Rainbow  edition.    And
  240. thanks  to  Gisbert  Selke,  Jack Bryans, and others for proofreading drafts of
  241. this manual, with apologies to anyone we neglected to mention.
  242.  
  243. Work on version 2.31 began within weeks of the release of 2.30.  The major  new
  244. features were an improved command interface, a fully capable script programming
  245. language, and inclusion of file attributes packets to send the time,  date  and
  246. size  of files along with the data.  Support for Ungermann-Bass Net One LAN was
  247. also added, thanks to contributions from Henrik Levkowetz  and  Renne  Rehmann.
  248. These changes led to a fairly thorough revision of the interior while providing
  249. the familiar commands and new features.  Meanwhile, Horofumi Fujii and  Akihiro
  250. Shirahasi  of  the  National  Laboratory for High-Energy Physics (KEK) in Japan
  251. adapted 2.31 to the NEC  PC-9801,  and  for  this  machine  added  support  for
  252. Japanese Kana and Kanji character sets.
  253.  
  254. Version  2.32  was  issued  by Joe in December 1988.  It included the usual bug
  255. fixes, plus several new script programming features, and improved  support  for
  256. international  use,  allowing  for  languages like Hebrew and Arabic that print
  257. right to left, adapted from work by Baruch Cochavy, IIT, Technion,  Haifa,  Is-
  258. rael.    Thanks also to Glenn Trewitt, Mark Zinzow, and Ken Ridley for valuable
  259. suggestions and contributions to this release.
  260.  
  261. Like all Kermit programs, MS-DOS Kermit may be freely  copied  and  shared,  so
  262. long as it is not done for profit.
  263.  
  264.  
  265. 1.3. Using MS-Kermit
  266.  
  267. MS-DOS  Kermit performs two major functions, terminal emulation and file trans-
  268. fer.  File transfer can be done using either the Kermit file transfer protocol,
  269. or  else  (without  error checking), ASCII or XON/XOFF capture and transmission
  270. methods.  To use Kermit for "raw" uploading or downloading of  files,  see  the
  271. descriptions of the TRANSMIT and LOG SESSION commands.
  272.  
  273. Before  you  can  transfer files with another system using Kermit protocol, you
  274. must first connect to it as a terminal, login if necessary, and start up a Ker-
  275. mit program there.  Kermit's CONNECT command lets you do this by making your PC
  276. act like a terminal.  After setting things up on the other computer,  you  must
  277. return  to  the PC and tell it what to do.  Returning to the PC is accomplished
  278. by typing a special sequence of characters, called the "escape sequence."
  279.  
  280. The following example shows this process; the other computer is a Unix  system,
  281. but the method is the same with most others.  The parts you type are underlined
  282. (if this document was printed on a printer that can underline),  and  when  you
  283. type a command, you terminate it with a carriage return, which you can't see in
  284. the example.  The mysterious "^]c" is MS-Kermit's escape  sequence,  which  you
  285. enter  by  holding  down  the Control (Ctrl) key and pressing "]" (right square
  286. bracket), and then typing the letter  C.  The  example  assumes  the  MS-Kermit
  287. program is stored on disk as KERMIT.EXE.
  288.  
  289.     Program Dialog:             Explanation:
  290.  
  291.     A>kermit
  292.     IBM PC Kermit-MS V2.32 11 Dec 1988                                     
  293.     Type ? or HELP for help
  294.  
  295.     Kermit-MS>set speed 1200    Set the right baud rate.
  296.     Kermit-MS>connect           Connect as a terminal.
  297.     ATDT7654321                 Dial the modem if necessary.
  298.     CONNECT 1200                The modem tells you you're connected.
  299.  
  300.       Now you're talking to the Unix system.
  301.       Type a carriage return to get its attention.
  302.  
  303.     Login: max                  Login to the host.
  304.     password:                   (Passwords normally don't echo.)
  305.     % kermit                    Run Kermit on the host.
  306.     C-Kermit>receive            Tell it to receive a file.
  307.     ^]c                         Escape back to the PC.
  308.     Kermit-MS>send autoexec.bat Send a file.
  309.  
  310.       (The file is transferred...)
  311.  
  312.     Kermit-MS>                  Transfer complete, prompt reappears.
  313.  
  314. In this example, the user types "kermit", and sees the program's herald and its
  315. prompt, "Kermit-MS>".  Then she sets the appropriate communication speed ("baud
  316. rate"),  connects as a terminal, issues a dialing command to a Hayes-like modem
  317. (you would skip this step if you had a direct connection), logs in to her ID on
  318. the  Unix  system  which  she has dialed, starts "C-Kermit" on the Unix system,
  319. tells it to receive a file, escapes back to the PC, and tells MS-Kermit to send
  320. a file.  After the file is transferred, the user would normally connect back to
  321. the Unix system, exit from the Kermit program there, and log out:
  322.  
  323.     Kermit-MS>connect        Connect again.
  324.     C-Kermit>exit
  325.     % ^D                     Logout from Unix by typing Ctrl-D.
  326.     ^]c                      Escape back to the PC.
  327.     Kermit-MS>exit           Return to DOS.
  328.  
  329. To transfer a file in the other  direction,  simply  exchange  the  "send"  and
  330. "receive"  commands  above.  That's the easiest and quickest way to use Kermit.
  331. If this simple scenario does not work for you, issue the  MS-Kermit  SHOW  COM-
  332. MUNICATIONS  command  and look for any obvious incorrect settings (port, speed,
  333. parity), fix them with SET commands (described  in  Section  1.6.10),  and  try
  334. again.   (IBM mainframe linemode connections have so many "different" settings,
  335. there's a special command to do them all at once, "do  ibm",  which  you  would
  336. type  as  the  first  Kermit-MS command above.)  If that doesn't help, read on.
  337. Many problems can crop up when you attempt to connect two unlike systems over a
  338. possibly hostile communication medium.  And if you intend to be a frequent user
  339. of Kermit, there are many options you can take advantage of to adapt  MS-Kermit
  340. to different systems, improve its performance, and automate common tasks.
  341.  
  342.  
  343. 1.4. The MS-DOS File System
  344.  
  345. The features of the MS-DOS file system of greatest interest to Kermit users are
  346. the form of the file specifications, and the formats of the files themselves.
  347.  
  348.  
  349. 1.4.1. File Specifications
  350.  
  351. MS-DOS file specifications (in version 2.0 or later of DOS) are of the form
  352.  
  353.     DEVICE:\PATHNAME\NAME.TYPE
  354.  
  355. where the DEVICE is a single character identifier  (for  instance,  A  for  the
  356. first  floppy disk, C for the first fixed disk, D for a RAM disk emulator) fol-
  357. lowed by a colon (":"), PATHNAME is up to 63 characters of identifier(s) (up to
  358. 8 characters each) surrounded by backslashes ("\"), NAME is an identifier of up
  359. to 8 characters, and TYPE is an identifier of up to  3  characters  in  length.
  360. Device and pathname may be omitted.  The first backslash in the pathname may be
  361. omitted if the specified path is relative to the current  directory.    In  the
  362. path  field,  "." means the current directory, ".." means the parent directory.
  363. Some DOS implementations (like Wang) may use slash ("/") rather than  backslash
  364. as a directory separator.
  365.  
  366. Pathname  is  normally  omitted, but can be specified in all Kermit-MS commands
  367. (as of version 2.29).  Device and directory pathnames, when omitted, default to
  368. either  the  user's  current  disk  and  directory, or to the current directory
  369. search path as specified in the DOS PATH environment variable, depending on the
  370. context in which the file name appears.
  371.  
  372.     When  this  document  says  that a file is searched for "in the current
  373.     path," it means that Kermit-MS looks on the current disk and  directory
  374.     first, and if the file is not found, then the directories listed in the
  375.     PATH environment variable are searched.  If the PATH environment  vari-
  376.     able is empty, Kermit looks only at the current disk and directory.
  377.  
  378. NAME.TYPE  is  sufficient  to specify a file on the current disk and directory,
  379. and only this information is sent along by Kermit-MS with an outgoing file.
  380.  
  381. The device, path, name, and type fields may contain uppercase letters,  digits,
  382. and the special characters "-" (dash), "_" (underscore), "$" (dollar sign), "&"
  383. (ampersand), "#" (number sign), "@" (at sign), "!"    (exclamation  mark),  "'"
  384. (single  quote),  "()"  (parentheses),  "{}"  (curly  braces),  "^"  (caret  or
  385. circumflex), "~" (tilde), and "`" (accent grave).  Normally, you should confine
  386. your  filenames  to  letters and digits for maximum transportability to non-DOS
  387. systems.  When you type lowercase letters  in  filenames,  they  are  converted
  388. automatically  to  uppercase.  There are no imbedded or trailing spaces.  Other
  389. characters may not be included; there is no mechanism for  "quoting"  otherwise
  390. illegal  characters in filenames.  The fields of the file specification are set
  391. off from one another by the punctuation indicated above.
  392.  
  393. The name field is the primary identifier for the file.  The type,  also  called
  394. the  extension or suffix, is an indicator which, by convention, tells what kind
  395. of file we have.  For instance FOO.BAS is the source of a BASIC  program  named
  396. FOO;  FOO.OBJ  might  be  the  relocatable  object module produced by compiling
  397. FOO.BAS; FOO.EXE could be an executable program produced  by  loading  FOO.OBJ,
  398. and so forth.  .EXE and .COM are the normal suffixes for executable programs.
  399.  
  400. MS-DOS  allows  a group of files to be specified in a single file specification
  401. by including the special "wildcard" characters, "*" and "?".  A "*" matches any
  402. string of characters from the current position to the end of the field, includ-
  403. ing no characters at all; a "?" matches any single character.   Here  are  some
  404. examples:
  405.  
  406.   *.BAS   All files of type BAS (BASIC source files) in the current directory.
  407.  
  408.   FOO.*   Files of all types with name FOO.
  409.  
  410.   F*.*    All files whose names start with F.
  411.  
  412.   *.?     All files whose types are exactly one character long, or have no type
  413.           at all.
  414.  
  415. Wildcard notation is used on many computer systems in similar ways, and  it  is
  416. the mechanism most commonly used to instruct Kermit to send a group of files.
  417.  
  418. Users  of Kermit-MS should bear in mind that other (non-MS-DOS) systems may use
  419. different wildcard characters.  For instance VMS and the DEC-20 use "%" instead
  420. of  "?"  as  the  single  character wildcard; when using Kermit-MS to request a
  421. wildcard file group from a Kermit-20 server, the DOS "?" must  be  replaced  by
  422. the DEC-20 "%".
  423. 1.4.2. File Formats
  424.  
  425. MS-DOS  systems  store files as streams of 8-bit bytes, with no particular dis-
  426. tinction among text, program code, and binary files.  ASCII text files  consist
  427. of lines separated by carriage-return-linefeed sequences (CRLFs), and this con-
  428. forms exactly to the way Kermit represents text files during  transmission,  so
  429. Kermit-MS  has  no  need  for a SET FILE TYPE BINARY command.  But since a non-
  430. MS-DOS receiving system might need to make distinctions as to  file  type,  you
  431. will  probably have to issue SET FILE TYPE commands there if you are sending it
  432. non-text files.  In transmitting files between Kermit-MS  programs,  regardless
  433. of  file contents, the receiving MS-DOS system is equally capable of processing
  434. text, code, and data, and in fact requires no knowledge of how the bytes in the
  435. file are to be used.
  436.  
  437. MS-DOS  (unlike  CP/M)  knows  the  exact end of a file because it keeps a byte
  438. count in the directory, so one would expect no  particular  confusion  in  this
  439. regard.    However, certain MS-DOS programs continue to use the CP/M convention
  440. of terminating a text file with a Control-Z character, and won't  operate  cor-
  441. rectly unless this terminating byte is present.  Therefore, you should be aware
  442. of a special SET EOF option for both incoming  and  outbound  files,  described
  443. later.
  444.  
  445. Non-MS-DOS  systems  may  be  confused  by  nonstandard  ASCII  files  sent  by
  446. Kermit-MS:
  447.  
  448.    - Files containing any of the 8-bit  "extended  ASCII"  characters  may
  449.      need conversion (or translation) to 7-bit ASCII.
  450.  
  451.    - Files  produced by word processing programs like Word Perfect or Word
  452.      Star may contain special binary formatting codes, and could need con-
  453.      version  to  conventional  7-bit  ASCII format prior to transmission,
  454.      using an "export" procedure.
  455.  
  456.    - Files created by word processors that store formatting  data  at  the
  457.      end of the file, after the Control-Z and before physical end, may re-
  458.      quire special processing via SET EOF to strip  the  formatting  data,
  459.      lest they confuse non-MS-DOS recipients.
  460.  
  461.    - Spreadsheet  or  database files usually need special formatting to be
  462.      meaningful to non-MS-DOS recipients (though they can  be  transmitted
  463.      between  MS-DOS  systems with Kermit-MS).  Such programs usually come
  464.      with an "export" procedure to convert  their  files  to  plain  ASCII
  465.      text.
  466.  
  467.    - BASIC  programs are normally saved in a binary "tokenized" form.  Use
  468.      BASIC's ",a" SAVE option to save them as regular ASCII text, as in
  469.  
  470.          save"foofa",a
  471.  
  472. In general, when attempting to transfer non-text files  between  MS-DOS  and  a
  473. different kind of system, consult the Kermit manual for that system.
  474.  
  475.  
  476. 1.5. Program Setup and Invocation
  477.  
  478. The  MS-DOS Kermit program can be run from any disk without any special instal-
  479. lation procedure.  On hard disk systems, it is convenient to store the  program
  480. in one of the directories listed in your DOS PATH, and it is often desirable to
  481. customize Kermit's operation to your communications and  computing  environment
  482. by creating an initialization file.
  483.  
  484. Kermit-MS  can  be  run  interactively, from a batch file, as an "external" DOS
  485. command, or from redirected standard input.  Commands consist of  one  or  more
  486. fields, separated by "whitespace" -- one or more spaces or tabs.
  487.  
  488. Upon  initial  startup,  the  program  executes  any commands found in the file
  489. MSKERMIT.INI on the current disk, or (if not found on the current disk) in  the
  490. first  directory containing a file by that name, from the list in your DOS PATH
  491. environment variable.  The Kermit initialization file may contain command macro
  492. definitions,  communications  settings  for  one  or  more  ports, or any other
  493. Kermit-MS commands, and you may create it using  any  text  editor  capable  of
  494. saving files in plain ASCII text format.  Here is a sample:
  495.  
  496. comment -- MSKERMIT.INI, MS-DOS Kermit initialization file
  497.  
  498. comment -- Don't overwrite my files!
  499.  set warning on
  500.  
  501. comment -- Define macros for the systems I use...
  502.  define unix set local-echo off,set par non,set flow xon,set timer off
  503.  def ibm set par odd,set loc on,set hands xon,set flo none,set tim on
  504.  def modem set port 2, set speed 1200
  505.  
  506. comment -- Define macros for quickly adapting to varying
  507.  def noisy  set block-check 3, set receive packet 40, set retry 20
  508.  def normal set block-check 1, set rec pack 94, set retry 5
  509.  def clean  set block-check 2, set rec pack 500, set retry 5
  510.  
  511. comment -- I always start out by connecting to my UNIX system...
  512.  set port 1
  513.  set speed 4800
  514.  do unix
  515.  connect
  516.  
  517. A  different file may be substituted for MSKERMIT.INI by using "-f filename" on
  518. the DOS command line, e.g.
  519.  
  520.     kermit -f monday.ini
  521.  
  522. The meanings of these commands will emerge below.  For now, just note  how  you
  523. can  use  command  files (and "macro definitions") to easily adapt MS-Kermit to
  524. widely differing communication environments.  A  more  advanced  initialization
  525. file is shown in section 1.9.
  526.  
  527.  
  528. Interactive Operation:
  529.  
  530. To  run  Kermit-MS  interactively, invoke the program from DOS command level by
  531. typing its name, normally "kermit" (this means the program should be stored  in
  532. your path with the name KERMIT.EXE).  When you see the program's prompt,
  533.  
  534.     Kermit-MS>
  535.  
  536. you  may  type  Kermit  commands  repeatedly  until  you  are ready to exit the
  537. program, as in the following example (which assumes there's  already  a  Kermit
  538. "server" set up on the other end):
  539.  
  540.     A>
  541.     A>kermit
  542.  
  543.     IBM PC Kermit-MS V2.32  11 Dec 1988
  544.     Type ? or HELP for help
  545.  
  546.     Kermit-MS>set speed 19200
  547.     Kermit-MS>send foo.*
  548.  
  549.       The files are sent.
  550.  
  551.     Kermit-MS>get fot.*
  552.  
  553.       The requested files are received.
  554.  
  555.     Kermit-MS>exit
  556.     A>
  557.  
  558. Interactive commands are described in Section 1.6.
  559.  
  560.  
  561. Command Line Invocation:
  562.  
  563. Kermit-MS  may  be  invoked with command line arguments from DOS command level,
  564. for instance:
  565.  
  566.     A>kermit send peter.amy
  567.  
  568. or
  569.  
  570.     A>kermit set port 1, set speed 9600, connect
  571.  
  572. In this case, help and completion  are not available (because the program  that
  573. provides  them  won't  start  running  until  after you type the entire command
  574. line), and Kermit-MS will exit back to DOS after completing the specified  com-
  575. mand  or  commands.    Therefore,  when  invoked  with  command line arguments,
  576. Kermit-MS will behave as if it were an external DOS command, like MODE.    Note
  577. that  several  commands  may be given on the command line, separated by commas.
  578. This can't be done interactively or from TAKE command files.
  579.  
  580. Two special Kermit commands can be given on the DOS command line.  First is the
  581. keyword STAY which prevents Kermit from exiting naturally when the last command
  582. has completed (unless, of course, EXIT or QUIT was among the  commands).    The
  583. second command is
  584.  
  585.     -F filename
  586.  
  587. This  means  use  the indicated filename as the initialization file rather than
  588. MSKERMIT.INI.  The PATH will be searched for this file, if necessary.  A  space
  589. or  tab  must separate -F from the filename, and the F may be in upper or lower
  590. case.  Example:
  591.  
  592.     kermit -f tuesday.ini, set port 2, do ibm, stay
  593.  
  594. You can run Kermit with no initialization file at all by using the command
  595.  
  596.     kermit -f nul
  597.  
  598. If -F is the only command line option, STAY is implied.
  599.  
  600.  
  601. Redirected Input and Output
  602.  
  603. Kermit-MS also can be operated by redirecting input to it from a file, as in:
  604.  
  605.     C>kermit < myscript.txt > myscript.log
  606.  
  607. or from a DOS "pipe", as in
  608.  
  609.     C>sort < sends.txt | kermit
  610.  
  611. The file MYSCRIPT.TXT contains Kermit commands as if they were typed  manually.
  612. The DOS symbol "<" means that Kermit should read from the following file rather
  613. from the keyboard.
  614.  
  615. Kermit knows this is occurring and  takes  special  steps  to  avoid  the  real
  616. keyboard  and to quit when the file has been completely examined.  The filename
  617. can also be the name of a device, such as COM1, to converse on the same or dif-
  618. ferent  line  as  file  transfer  traffic.  Information destined for the screen
  619. still goes to the screen unless the phrase "> filespec" is added to the command
  620. line  above  to  send the normal screen output to a file or device (device COM1
  621. also works).  Note that the terminal emulation screen cannot be redirected.
  622. Batch Operation:
  623.  
  624. Like many other MS-DOS programs, Kermit-MS may be operated under DOS batch with
  625. command  line  arguments.   If you invoke it without command line arguments, it
  626. will run interactively, reading commands from the keyboard and  not  the  batch
  627. file.    When  it exits, batch processing will continue to the end of the batch
  628. file.
  629.  
  630. Kermit-MS returns the "errorlevel"  parameter  used  as  program  exit  status.
  631. Present  values  are  in  the range 0 to 7 with three areas yielding success or
  632. failure reports for the entire Kermit session. The errorlevel values are:
  633.    errorlevel   Kermit session status
  634.         0       entirely successful operation
  635.         1       a Send command completed unsuccessfully
  636.         2       a Receive or GET command completed unsuccessfully
  637.         4       a REMOTE command completed unsuccessfully
  638.      3,5,6,7    combinations (addition) of the above conditions
  639.  
  640. Note that failures are remembered for the whole session and are not canceled by
  641. a  following successful operation of the same type. Thus, sending several files
  642. individually yields an errorlevel of 0 only if all the files were sent success-
  643. fully.  The "errorlevel" parameter also applies to script commands where OUTPUT
  644. corresponds to SEND and INPUT to RECEIVE.  An example of  Batch  invocation  of
  645. Kermit is shown in Figure 1-4.
  646.  
  647. You  may  also  force  Kermit  to  return any desired errorlevel, using the SET
  648. ERRORLEVEL command.  DOS batch parameters may be passed along  to  Kermit;  see
  649. section 1.7 for details.
  650.  
  651.  
  652. Remote Operation:
  653.  
  654. The MS-DOS CTTY command allows an MS-DOS system to be used from a terminal con-
  655. nected to its communication port.  Such sessions must be conducted  with  great
  656. care, since many programs assume that they are running on the real console, and
  657. explicitly reference screen memory or the physical keyboard.    Kermit  can  be
  658. used in this manner too, but before you give it any file transfer commands, you
  659. must inform it that it is running in  "remote  mode"  rather  than  its  normal
  660. "local  mode."   Use the SET REMOTE ON command for this purpose, to prevent the
  661. file transfer display from being sent out the port.
  662.  
  663.  
  664. RAM Disk Operation:
  665.  
  666. If you invoke Kermit frequently, and you have sufficient memory on your PC, you
  667. may find it convenient to copy Kermit and its initialization file to a RAM disk
  668. when you start your system.  This allows Kermit to be started and used  quickly
  669. and silently, with no mechanical disk operations.
  670.  
  671. For  instance, if you're using IBM's VDISK facility to create the RAM disk, you
  672. might put statements like this in your CONFIG.SYS file:
  673.  
  674.     DEVICE=VDISK.SYS 384 512 128 /e
  675.  
  676. This assumes you have 384K of extended (/e) memory installed and  VDISK.SYS  is
  677. in  the  root directory of the boot disk.  It creates a 384K RAM disk with 512B
  678. sector size and space for 128 directories in the extended memory, assigning  it
  679. the  disk letter of your first unused disk.  And then in your AUTOEXEC.BAT file
  680. (assuming the RAM disk is disk D:)...
  681.  
  682.     COPY KERMIT.EXE   D: >NUL
  683.     COPY MSKERMIT.INI D: >NUL
  684.     COPY COMMAND.COM  D: >NUL
  685.     SET COMSPEC=D:\COMMAND.COM
  686.     PATH D:\; ...
  687.  
  688. The PATH command allows DOS to find KERMIT.EXE, and Kermit to find MSKERMIT.INI
  689. and COMMAND.COM, on the RAM disk.  If you use Kermit transfer files to your RAM
  690. disk, remember to copy those files to a real disk before you turn off the  sys-
  691. tem.
  692.  
  693.  
  694. Use of MS-Kermit in Windowing and Multiprocessing Environments:
  695.  
  696. Kermit-MS  can  operate  within  windowing  environments  like such as TopView,
  697. DESqview, and MS-Windows.  It runs in an active window  under  MS-Windows,  ac-
  698. cepts  cut and paste material, talks with mice, and shrinks to an icon (a boxed
  699. "KER").  An MS-Windows .PIF file  can  be  constructed  for  Kermit  using  the
  700. PIFEDIT  program,  supplied with Windows.  Memory requirements should be listed
  701. as 102 to 160KB.  It should state that  Kermit  does  not  modify  the  screen,
  702. keyboard,  memory,  COM1, or COM2 (not true but it satisfies Windows).  Program
  703. switch and exchange should be marked as Text, and Close Window on  Exit  should
  704. be  checked.    This configuration will let you run Kermit with all the Windows
  705. features, but slowly.  To run at full speed under Windows,  tell  PIFEDIT  that
  706. Kermit modifies the screen.  Then you lose the Windows features (cutting, past-
  707. ing, running the clock at the same time, etc), but you still get  back  to  the
  708. Windows interface when you EXIT Kermit.
  709.  
  710. MS-Kermit  has also been reported to operate successfully under Concurrent DOS.
  711. However, since  it  does  not  interact  explicitly  with  the  Concurrent  DOS
  712. time-slice scheduler, Kermit will tend use a lot of CPU cycles.
  713.  
  714.  
  715. Local Area Network Operation:
  716.  
  717. MS-Kermiperation should be transparent to Kermit, but  not  all  asynchronous  com-
  718. munications servers utilize this technique.
  719.  
  720. As  of version 2.30, the IBM PC version of Kermit can also communicate directly
  721. with another PC on a local area network through the IBM NetBIOS  emulator  dis-
  722. tributed  with  the  LAN.  In essence, the LAN substitutes for the serial port,
  723. modem, and other wiring.  Kermit running on one user machine can transfer files
  724. with  another  Kermit  also  on  the  network much as if they were connected by
  725. modems, and Kermit can talk with some larger machines the same way.  The impor-
  726. tant network command is
  727.  
  728.     SET PORT NETBIOS nodename
  729.  
  730. for NetBios, or
  731.  
  732.     SET PORT UB-NET1 nodename
  733.  
  734. for  Ungermann-Bass Net-One NETCI.  For details, see the description of the SET
  735. PORT and SERVER commands, and (if you're interested) Section 1.18.1 for a tech-
  736. nical description.
  737.  
  738. Kermit  can  even  communicate with some other computers, such as Unix systems,
  739. which accept logins via this remote pathway.  The initial startup is  the  same
  740. as  calling a mainframe and logging in except the command SET PORT NET nodename
  741. is used instead of SET PORT COM1.  A connection is established with  the  first
  742. use  of the communications circuit, such as CONNECT, REMOTE DIR, SEND, or other
  743. file transfer command, and terminated with the HANGUP command.
  744.  
  745.  
  746. 1.6. Kermit-MS Commands
  747.  
  748. MS-DOS Kermit has the following commands:
  749.  
  750.            -F  specify alternate init file name on DOS command line.
  751.           ASK  user to type text, in response to a prompt.
  752.        ASSIGN  the value of one variable to another.
  753.           BYE  to remote server, exit from MS-Kermit.
  754.         CLEAR  serial port buffer.
  755.         CLOSE  log files and stop logging remote session.
  756.       COMMENT  For including comments in command files.
  757.       CONNECT  as terminal to remote system (C).
  758.     CWD or CD  change local working directory.
  759.        DEFINE  a macro of Kermit-MS commands.
  760.        DELETE  local files.
  761.     DIRECTORY  listing of local files.
  762.       DISABLE  server recognition of selected commands.
  763.            DO  a command macro.
  764.          ECHO  a line of text on the screen.
  765.        ENABLE  server recognition of selected commands.
  766.          EXIT  from Kermit-MS.
  767.        FINISH  Shut down a remote Kermit server.
  768.           GET  remote files from server.
  769.          GOTO  jump to labeled line in script file.
  770.        HANGUP  the phone or network connection.
  771.          HELP  about Kermit-MS.
  772.            IF  decision-making in Take or Macro scripts.
  773.         INPUT  specified string from serial port, for scripts.
  774.           LOG  remote terminal session, transactions, or packets.
  775.        LOGOUT  remote server, don't exit from Kermit-MS.
  776.          MAIL  send file to remote Mailer via Kermit.
  777.        OUTPUT  string out serial port, for scripts.
  778.         PAUSE  between commands.
  779.           POP  exit Take file or Macro.
  780.          PUSH  to MS-DOS command level.
  781.          QUIT  from Kermit-MS (same as EXIT).
  782.       RECEIVE  files from remote Kermit (R).
  783.       REINPUT  reread script Input buffer.
  784.        REMOTE  Prefix for remote file management commands.
  785.           RUN  an MS-DOS program or command.
  786.          SEND  files to remote Kermit (S).
  787.        SERVER  mode of remote operation.
  788.           SET  various parameters.
  789.          SHOW  various parameters.
  790.         SPACE  inquiry (about disk space).
  791.        STATUS  inquiry (about settings).
  792.          STAY  stay within Kermit after DOS command line invocation.
  793.          STOP  exit all Take files or Macros.
  794.          TAKE  commands from a file.
  795.      TRANSMIT  a file "raw" (no error checking).
  796.          TYPE  a local file on the screen.
  797.       VERSION  display Kermit-MS program version number.
  798.          WAIT  for the specified modem signal to appear.
  799.  
  800. Not all of these commands are necessarily available on all MS-DOS systems,  and
  801. some of the commands may work somewhat differently between DOS versions.
  802.  
  803. A  command  keyword,  such  as SEND, RECEIVE, HELP, etc, may be abbreviated, so
  804. long as you have typed enough letters to distinguish  it  from  other  keywords
  805. that  are valid in that position.  For instance, you can type CLE for CLEAR and
  806. CLO for CLOSE.  Several common commands also have special non-unique  abbrevia-
  807. tions,  like  C  for CONNECT, S for SEND, and R for RECEIVE. Kermit will notify
  808. you if you have typed a word with too few letters.
  809.  
  810. During interactive operation, you may edit the command you're currently  typing
  811. using  BACKSPACE  to  erase the character most recently typed, Ctrl-W to delete
  812. the most recent field, or Ctrl-U to delete the entire  command.    The  editing
  813. characters  may be used in any combination until the command is finally entered
  814. by typing RETURN (Carriage Return, Enter) or Ctrl-L.
  815.  
  816. You may use the help ("?") and keyword completion  (ESC) features freely  while
  817. typing Kermit-MS commands.  A question mark typed at almost any point in a com-
  818. mand produces a brief description, or "menu", of what is expected  or  possible
  819. at  that point.  ESC typed at any point, except in a local filename, will cause
  820. the current field to be filled out if what you have typed so far is  sufficient
  821. to  identify  it,  and will leave you in position to type the next field (or to
  822. type a "?" to find out what the next field is);  otherwise,  the  program  will
  823. beep at you and wait for you to type more characters.
  824.  
  825. As of version 2.31, Kermit-MS recognizes full 8-bit character inputs, with only
  826. NUL, ESC, DEL/BS, Ctrl-W (delete word), Ctrl-U (delete line), and Ctrl-C  being
  827. special.   This is to enhance support for various languages and keyboards.  The
  828. SET KEY and SHOW KEY commands can prompt  for  keyboard  input  and  understand
  829. 8-bit characters but only at their interactive prompt.  The SET KEY, INPUT, and
  830. OUTPUT commands accept "backslash number format"  on the  main  Kermit  command
  831. line.  Thus, national characters which are full 8-bit codes can be expressed on
  832. command lines in backslash number form (\ddd), provided the Kermit command  it-
  833. self  can  understand  the  form.    Most  commands that want numbers or single
  834. characters as operands understand this notation.  To enter characters in  back-
  835. slash  number format, type a backslash ("\") followed by a number corresponding
  836. to the ASCII code for the character.  MS-Kermit accepts  many  different  back-
  837. slash  codes in different contexts.  These are summarized in Table 1-1; letters
  838. following the backslach may be either upper or lower case.
  839.  
  840. -------------------------------------------------------------------------------
  841.  
  842.  
  843.   \123    (up to 3 decimal digits) - A decimal number
  844.   \d123   (up to 3 decimal digits) - A decimal number
  845.   \o123   (up to 3 octal digits) - An octal (base 8) number
  846.   \x123   (up to 3 hexadecimal digits) - a hexadecimal (base 16) number
  847.   \{ }    For grouping, e.g. \{12}6 = Ctrl-L 6, not ~
  848.   \;      Include a semicolon in a TAKE-file command or macro definition.
  849.   \%      Introduce a Kermit variable, \%1, \%2, ..., \%a, \%b, ... \%z
  850.   \K      A Kermit connect-mode verb like \Kexit (see Table 1-6)
  851.   \B      Send a BREAK (OUTPUT command only)
  852.   \255    Shorthand for CRLF or LFCR (INPUT command only)
  853.   \CD     Carrier Detect RS-232 signal (WAIT command only)
  854.   \DSR    Data Set Ready RS-232 signal (WAIT command only)
  855.   \CTS    Clear to Send RS-232 signal (WAIT command only)
  856.  
  857.                    Table 1-1:  MS-DOS Kermit Backslash Codes
  858.  
  859. -------------------------------------------------------------------------------
  860.  
  861. Table 1-2 shows all of the 7-bit ASCII codes in decimal.  Most Kermit  commands
  862. understand  backslash-ASCII  codes, both imbedded within character strings, and
  863. alone, as when a single character or number is to be specified.
  864.  
  865. -------------------------------------------------------------------------------
  866.  
  867.  
  868.     Dec Name Ctrl            Dec Char      Dec Char     Dec Char
  869.  
  870.      0   NUL  ^@           |  32  SP    |   64   @   |   96  `
  871.      1   SOH  ^A           |  33   !    |   65   A   |   97  a
  872.      2   STX  ^B           |  34   "    |   66   B   |   98  b
  873.      3   ETX  ^C           |  35   #    |   67   C   |   99  c
  874.      4   EOT  ^D           |  36   $    |   68   D   |  100  d
  875.      5   ENQ  ^E           |  37   %    |   69   E   |  101  e
  876.      6   ACK  ^F           |  38   &    |   70   F   |  102  f
  877.      7   BEL  ^G beep      |  39   '    |   71   G   |  103  g
  878.      8   BS   ^H backspace |  40   (    |   72   H   |  104  h
  879.      9   HT   ^I tab       |  41   )    |   73   I   |  105  i
  880.     10   LF   ^J linefeed  |  42   *    |   74   J   |  106  j
  881.     11   VT   ^K           |  43   +    |   75   K   |  107  k
  882.     12   FF   ^L formfeed  |  44   ,    |   76   L   |  108  l
  883.     13   CR   ^M return    |  45   -    |   77   M   |  109  m
  884.     14   SO   ^N shift out |  46   .    |   78   N   |  110  n
  885.     15   SI   ^O shift in  |  47   /    |   79   O   |  111  o
  886.     16   DLE  ^P           |  48   0    |   80   P   |  112  p
  887.     17   DC1  ^Q XON       |  49   1    |   81   Q   |  113  q
  888.     18   DC2  ^R           |  50   2    |   82   R   |  114  r
  889.     19   DC3  ^S XOFF      |  51   3    |   83   S   |  115  s
  890.     20   DC4  ^T           |  52   4    |   84   T   |  116  t
  891.     21   NAK  ^U           |  53   5    |   85   U   |  117  u
  892.     23   ETB  ^W           |  54   6    |   86   V   |  118  v
  893.     22   SYN  ^V           |  55   7    |   87   W   |  119  w
  894.     24   CAN  ^X           |  56   8    |   88   X   |  120  x
  895.     25   EM   ^Y           |  57   9    |   89   Y   |  121  y
  896.     26   SUB  ^Z           |  58   :    |   90   Z   |  122  z
  897.     27   ESC  ^[ escape    |  59   ;    |   91   [   |  123  {
  898.     28   FS   ^\           |  60   <    |   92   \   |  124  |
  899.     29   GS   ^]           |  61   =    |   93   ]   |  125  }
  900.     30   RS   ^^           |  62   >    |   94   ^   |  126  ~
  901.     31   US   ^_           |  63   ?    |   95   _   |  127  RUBOUT,DELETE
  902.  
  903.             Table 1-2:  The US ASCII Character Set (ANSI X3.4-1977)
  904.  
  905. -------------------------------------------------------------------------------
  906.  
  907. Some Kermit-MS commands like GET, SHOW KEY, and SET KEY,  may  prompt  for  ad-
  908. ditional  information  on  subsequent  lines.  If you have reached one of these
  909. prompts and then wish to cancel the command, you may type Control-C to get back
  910. to the main Kermit-MS> prompt.
  911.  
  912.  
  913. Summary of Kermit-MS command editing characters:
  914.  
  915.     SPACE   Separates fields within the command.
  916.  
  917.     TAB     Same  as  Space,  and echoes as Space.  You may also use Ctrl-I for
  918.             Tab.
  919.  
  920.     BACKSPACE
  921.             Deletes the character most recently typed.  May be typed repeatedly
  922.             to delete all the way back to the prompt.  You may also use DELETE,
  923.             RUBOUT, Ctrl-H, or equivalent keys.
  924.  
  925.     Ctrl-W  Deletes the most recent "word", or field, on the command line.  May
  926.             be typed repeatedly.
  927.  
  928.     Ctrl-U  Deletes the entire command line, back to the prompt.
  929.  
  930.     Ctrl-C  Cancels the current command and returns to the "Kermit-MS>" prompt.
  931.             Also, terminates execution of a TAKE command file.
  932.  
  933.     ESC     If  enough  characters have been supplied in the current keyword to
  934.             identify it uniquely the remainder of the field is supplied and the
  935.             cursor  is positioned to the next field of the command.  Otherwise,
  936.             a beep is sounded.  ESC does not provide filename completion.
  937.  
  938.     ?       Displays a brief message describing what may be typed in  the  cur-
  939.             rent  command  field.    Also,  wildcard character for matching any
  940.             single character in all but the first position of a filename.
  941.  
  942.     #       Wildcard character for matching  single  characters  in  filenames.
  943.             Equivalent  to  MS-DOS  "?",  but  used  in the first position of a
  944.             filename only, so that "?" may be used to get help at the beginning
  945.             of a filename field.
  946.  
  947.     ENTER   Enters  the command.  On most keyboards, you may also use RETURN or
  948.             Ctrl-M.
  949.  
  950.     Ctrl-L  Clears the screen and enters the command.
  951.  
  952. Liberal use of "?" allows you to feel your way through the commands  and  their
  953. fields.    This  feature  is sometimes called "menu on demand" or "context sen-
  954. sitive help" -- unlike systems that force you to negotiate menus at every turn,
  955. menu-on-demand provides help only when it is needed.
  956.  
  957. Command  reading is done through DOS calls and Kermit key redefinition does not
  958. apply at Kermit-MS command level.   But  ANSI.SYS  or  other  external  console
  959. drivers  can  be  used for this purpose, for instance to assign ESC to the PC's
  960. backquote key (ANSI.SYS is the IBM-supplied extended screen and keyboard device
  961. driver,  described  in  the IBM DOS Technical Reference Manual).  Other console
  962. drivers available include ProKey, SuperKey, NANSI.SYS (a public-domain replace-
  963. ment for ANSI.SYS), and FANSICONSOLE.
  964.  
  965. The notation used in command descriptions is as follows:
  966.  
  967.     [square brackets]
  968.             An optional field.  This field may be omitted.
  969.  
  970.     {curly braces}
  971.             A  list  of  alternatives,  separated by commas.  Choose one of the
  972.             items from the list.
  973.  
  974.     italics Shows parameters, such  as  numbers  or  filenames,  are  shown  in
  975.             italics  (providing  the  printer  is capable of printing italics).
  976.             You substitute the actual number or filename.
  977.  
  978.     underlining
  979.             In  dialog  examples, the characters you should type are underlined
  980.             (on printers that can show it) to distinguish  them  from  computer
  981.             typeout.
  982.  
  983.     hh:mm:ss
  984.             A time of day, in 24-hour notation (10:00:00 is 10 AM; 23:30:00  is
  985.             11:30  PM), which may not be more than 12 hours later than the cur-
  986.             rent time.
  987.  
  988. The following sections describe all the MS-DOS Kermit  commands.    Since  some
  989. command descriptions may contain references to other commands that haven't been
  990. explained yet, you might find that this manual makes more  sense  on  a  second
  991. reading.
  992.  
  993.  
  994. 1.6.1. Program Management Commands
  995.  
  996. "Program  management" is a rubric for Kermit-MS commands like TAKE, EXIT, HELP,
  997. COMMENT, ECHO, and VERSION, that don't fall into any other category.
  998.  
  999. HELP displays a one screen introduction to frequently used Kermit commands  and
  1000. their  editing  keys,  and  suggests using the question mark command to see the
  1001. terse list of primary level Kermit commands.
  1002.  
  1003. VERSION displays the MS-Kermit program version number, which you should know in
  1004. case you are reporting bugs or seeking technical assistance.
  1005.  
  1006. Other program management commands require a bit more explanation.
  1007. The EXIT Command
  1008.  
  1009. Syntax: EXIT  or  QUIT
  1010.  
  1011. EXIT and QUIT are synonyms for each other.  They cause MS-Kermit to return con-
  1012. trol to DOS or whatever program invoked MS-Kermit.  The specific actions  taken
  1013. are:
  1014.  
  1015.    - Close any open log or other files.
  1016.    - Close any open network connection.
  1017.    - Release all memory claimed by the program.
  1018.    - Return  interrupts for the currently selected communication device to
  1019.      their original owner.
  1020.    - Terminate execution.
  1021.  
  1022. The serial port RS-232 signals are left alone upon EXIT, so that modem  connec-
  1023. tions  are  not broken.  Kermit-MS may be restarted with the connection intact.
  1024. Use HANGUP to explicitly break a modem connection; and use SHOW MODEM  or  SHOW
  1025. COMMUNICATIONS  to  view  the status of modem signals CD (Carrier Detect), Data
  1026. Set (modem) Ready (DSR), and Clear To Send (CTS).
  1027.  
  1028.  
  1029. The STAY Command
  1030.  
  1031. Syntax: STAY
  1032.  
  1033. The STAY command, if included among command line arguments, instructs MS-Kermit
  1034. not  to  exit upon completion but rather to enter interactive mode, unless EXIT
  1035. or QUIT was among the command arguments.  STAY has no effect when  entered  in-
  1036. teractively or from a TAKE file.
  1037.  
  1038.  
  1039. The PUSH Command
  1040.  
  1041. Syntax: PUSH
  1042.  
  1043. PUSH  is  similar  to  EXIT,  except  it leaves MS-Kermit intact by invoking an
  1044. MS-DOS command processor "under"  Kermit-MS,  either  COMMAND.COM  or  whatever
  1045. shell  you  have  specified with COMSPEC (or SHELL, depending on the system) in
  1046. your CONFIG.SYS file.  You can return to Kermit-MS by typing  the  MS-DOS  EXIT
  1047. command,  and you will find Kermit-MS as you left it, with all settings and the
  1048. terminal emulation screen intact.  The same function is invoked by the  CONNECT
  1049. escape-level command P. Example:
  1050.  
  1051.     Kermit-MS>push           Push to DOS.
  1052.     Command v. 3.30          COMMAND.COM program herald.
  1053.  
  1054.     C>diskcopy a: b:         Run a DOS program.
  1055.  
  1056.       DISKCOPY dialog here...
  1057.  
  1058.     C>dir b:                 More DOS commands...
  1059.  
  1060.       DOS session continues...
  1061.  
  1062.     C>exit                   When done, type DOS EXIT command.
  1063.     Kermit-MS>               Back at Kermit.
  1064.  
  1065.  
  1066. The TAKE Command
  1067.  
  1068. Syntax: TAKE filespec
  1069.  
  1070. The  TAKE  command  gives you way a to collect MS-Kermit commands into a single
  1071. file, so that you can execute many commands by typing a single (TAKE)  command.
  1072. TAKE  instructs  MS-Kermit  to execute commands from the file that you specify.
  1073. The current directory is searched for the file first, and then any  directories
  1074. listed  in  the  PATH  environment  variable.  The command file may include any
  1075. valid Kermit-MS commands, including TAKE, but it cannot include  characters  to
  1076. be  sent  to  a  remote  host  after  a  CONNECT command (use scripts for that,
  1077. described below).  Execution  of  a  TAKE  file  may  be  cancelled  by  typing
  1078. Control-C at the keyboard.
  1079.  
  1080. An implicit TAKE command is executed upon the initialization file, MSKERMIT.INI
  1081. (or another file specified in the "-f"  command-line  argument),  whenever  you
  1082. start  MS-Kermit.    The MSKERMIT.INI file contains any commands you want to be
  1083. executed each time you run Kermit.  A sample is shown above,  and  a  more  am-
  1084. bitious example is shown in section 1.9.
  1085.  
  1086. Commands  within  TAKE files, unlike interactive commands, may include trailing
  1087. comments, preceded by semicolons:
  1088.  
  1089.     set port 2      ; Select the modem port.
  1090.     set speed 1200  ; Set the baud rate for the modem.
  1091.     connect         ; Conduct a terminal session.
  1092.     hangup          ; Hang up the phone after escaping back.
  1093.  
  1094. Note the HANGUP command after CONNECT.  The HANGUP command is not executed  un-
  1095. til  after you escape back from your CONNECT session.  If this file were called
  1096. MODEM.CMD, the following TAKE command would execute it:
  1097.  
  1098.     Kermit-MS>take modem.cmd
  1099.  
  1100. This directs MS-Kermit to find the MODEM.CMD file, open it,  execute  the  com-
  1101. mands  in  it,  close  it, and return to the MS-Kermit> prompt when done.  This
  1102. process can take a while on floppy-disk based systems.
  1103.  
  1104. Since TAKE file processing discards all characters from a line  beginning  with
  1105. the  first semicolon, it is normally not possible to include semicolons as part
  1106. of the commands themselves, e.g.
  1107.  
  1108.     get dska:foo.bar;6
  1109.  
  1110. To get around this restriction, you may precede such semicolons  with  a  back-
  1111. slash:
  1112.  
  1113.     get dska:foo.bar\;6
  1114.  
  1115. Commands  from  the  TAKE  file  will  normally not be displayed on your screen
  1116. during execution.  If you want to see them as they are executing, you  can  SET
  1117. TAKE-ECHO ON (for instance, at the beginning or end of your MSKERMIT.INI file).
  1118. With the echoing ON, comments are also displayed for reference, but  the  semi-
  1119. colon is not shown.
  1120.  
  1121. TAKE  files  may  be nested to a reasonable level.  A command file that was in-
  1122. voked by another command file normally returns to its  invoking  command  file,
  1123. rather  than  to  the  MS-Kermit>  prompt,  when the end of the command file is
  1124. reached.
  1125.  
  1126. TAKE files have two commands to quit processing before the end of the  file  is
  1127. reached.    The  POP command exits the current TAKE file (or macro) and returns
  1128. control to the previously executing TAKE or macro, where one is invoked  within
  1129. another.  The STOP command exits all TAKE files and macros and returns directly
  1130. to the Kermit prompt.
  1131.  
  1132. In TAKE files (and macro definitions, which are discussed later), long commands
  1133. may  be continued on subsequent lines by terminating each continued line with a
  1134. hyphen (minus sign).  If a line needs to terminate with a real  minus  sign  it
  1135. may  be expressed numerically as \45 or can be extented with extra spaces.  The
  1136. overall command length is normally 127 bytes (a beep sounds near this limit).
  1137.  
  1138. An explicit question mark ("?") in a TAKE file will cause a help message to  be
  1139. displayed  and  the  rest  of the line will be read as another command.  If you
  1140. need to include a question mark in a command, use the ASCII backslash  notation
  1141. "\63".
  1142.  
  1143.  
  1144. The -F Command
  1145.  
  1146. Syntax: -F filespec
  1147.  
  1148. The  "-f"  command  is  effective  only  on the DOS command line.  It instructs
  1149. MS-Kermit to use the specified file as its  initialization  file,  rather  than
  1150. MSKERMIT.INI.    Unlike other command-line arguments, "-f" does not, of itself,
  1151. cause MS-Kermit to exit upon completion.  Example:
  1152.  
  1153.     C>kermit -f sunday.ini
  1154.     Kermit-MS>
  1155.  
  1156. The -F command line option allows different MS-Kermit initialization  files  to
  1157. coexist.  You can create batch commands to invoke Kermit in different ways, for
  1158. instance MONDAY.BAT might contain "kermit -f monday.ini",  TUESDAY.BAT  "kermit
  1159. -f tuesday.ini", etc.
  1160.  
  1161.  
  1162. The ECHO Command
  1163.  
  1164. Syntax: ECHO [string]
  1165.  
  1166. The  ECHO  command  writes  the string to the screen, without adding a carriage
  1167. return or line feed.  ECHO may be used to report progress during execution of a
  1168. TAKE command file, or to issue prompts during the execution of a script.
  1169.  
  1170.     ECHO Part one completed...\13
  1171.  
  1172. The  number  at the end is a "backslash codes" for ASCII control characters, in
  1173. this case carriage return (\13).  Since the ECHO command  interprets  backslash
  1174. codes, ANSI.SYS and similar console drivers can be programmed through this com-
  1175. mand by embedding ANSI escape  sequences  (see  section  1.17.3)  in  the  echo
  1176. string.  The ECHO command always outputs a linefeed before the string.
  1177.  
  1178.  
  1179. The COMMENT Command
  1180.  
  1181. Syntax: COMMENT text
  1182.  
  1183. The  COMMENT  command  lets  you add comments to a TAKE command file.  The word
  1184. COMMENT (or any unique prefix thereof) must appear as the  first  word  on  the
  1185. line.  The COMMENT command may also be entered interactively.  It has no effect
  1186. at all.  Example:
  1187.  
  1188.     COMMENT - MS-Kermit command file to connect port 2 to an IBM mainframe
  1189.     set port 2
  1190.     set speed 4800   ; Transmission rate is 4800
  1191.     do ibm           ; Set parameters for IBM linemode
  1192.     connect          ; Be a terminal
  1193.  
  1194. Question marks can be included in comments without invoking the help function.
  1195.  
  1196.  
  1197. 1.6.2. Local File Management Commands
  1198.  
  1199. These commands are executed on your local PC, and  generally  invoke  DOS  ser-
  1200. vices.  This allows you to perform common DOS functions without leaving Kermit.
  1201. All file specifications may include device and/or directory fields.  The  local
  1202. file management commands are:
  1203.  
  1204. CWD path
  1205.         Changes  the  current  working  directory  to  the  given  path.    All
  1206.         references  to  local  file  names without explicit paths will refer to
  1207.         that path.  A drive letter may be included to also change disk  drives.
  1208.         This  command  affects Kermit and any inferior programs that you RUN or
  1209.         PUSH to, but your previous disk and directory  are  restored  when  you
  1210.         exit from Kermit.  For consistency with DOS, you may also type CD.
  1211.  
  1212. DELETE filespec
  1213.         Deletes the specified file or files.  As  in  DOS,  the  names  of  the
  1214.         deleted  files  are  not  listed, only the message "file(s) deleted" or
  1215.         "file(s) not  found",  and  if  you  give  the  command  "delete  *.*",
  1216.         Kermit-MS will prompt "Are you sure?" since DOS is doing the work.
  1217.  
  1218. DIRECTORY [filespec]
  1219.         Lists the names, sizes, and creation dates  of  files  that  match  the
  1220.         given  file  specification.    If  no filespec is given, the command is
  1221.         equivalent to DIR *.*.  Normal DOS switches are effective.
  1222.  
  1223. SPACE   Tells how much space is available on the current disk.
  1224.  
  1225. RUN command
  1226.         Passes  the  command  line to COMMAND.COM for execution.  Any legal DOS
  1227.         operation is permitted: running a program (perhaps  with  command  line
  1228.         arguments  or i/o redirection), executing a DOS command, or executing a
  1229.         batch file.  Kermit is suspended while  the  command  is  executed  and
  1230.         automatically resumes afterward.  The command will be executed directly
  1231.         by COMMAND.COM so follow the rules of DOS.  Example:
  1232.  
  1233.             Kermit-MS>run more < xmas.txt
  1234.  
  1235.  
  1236.  
  1237. TYPE filespec
  1238.         Displays  the  specified  local file on the screen.  Automatic pause is
  1239.         not available at the end of a page (but see above example  for  how  to
  1240.         accomplish this).  On most systems, Ctrl-S can be typed to stop scroll-
  1241.         ing and Ctrl-Q to continue scrolling.
  1242.  
  1243. In most cases when you issue a local command, Kermit attempts to run the equiv-
  1244. alent  DOS command.  If you get a message like "?Unable to execute program", it
  1245. means that Kermit could not find COMMAND.COM, or  that  there  was  not  enough
  1246. memory left to load it.  To ensure that Kermit can find COMMAND.COM, you should
  1247. include a PATH statement in your AUTOEXEC.BAT file, which includes  the  device
  1248. and directory where COMMAND.COM resides.
  1249.  
  1250. You can add your own local commands by defining macros for them.  For example:
  1251.  
  1252.     define edit run epsilon \%1
  1253.     define more run more < \%1
  1254.     define rename run ren \%1 \%2
  1255.  
  1256. Then  you  can  use  these  commands at Kermit-MS prompt level: "edit foo.bar",
  1257. "more oofa.txt", "rename  old.txt  new.txt".    However,  you  cannot  redefine
  1258. built-in commands, for example:
  1259.  
  1260.     define send receive \%1
  1261.  
  1262. See Section 1.7 for further information about macros.
  1263. 1.6.3. COMMANDS FOR TERMINAL CONNECTION
  1264.  
  1265. The CONNECT command connects your PC as a terminal to the remote system so that
  1266. you may conduct a session there, and the HANGUP command may be used to  discon-
  1267. nect  your  modem (if you have one) from the remote system.  There is presently
  1268. no built-in DIAL command.  Modems may be dialed "manually" during  CONNECT,  or
  1269. you  can  construct your own DIAL command by using scripts, which are described
  1270. in detail in subsequent sections.
  1271.  
  1272. For completeness, the descriptions below contain copious reference to  the  SET
  1273. commands,  which  let  you  modify  all  sorts  of  terminal  and communication
  1274. parameters (the SET commands are described in a later section).   MS-Kermit  is
  1275. initially  set up with the following parameters, so that you only need to issue
  1276. SET commands for those that need to be changed:
  1277.  
  1278.     PORT                    1 (in most cases, e.g. COM1 on the IBM PC family)
  1279.     TERMINAL                VT102(*) emulation (IBM PC, DEC Rainbow)
  1280.     SPEED                   Whatever the serial card is currently set to.
  1281.     PARITY                  None
  1282.     FLOW-CONTROL            XON/XOFF
  1283.     HANDSHAKE               None
  1284.     LOCAL-ECHO              Off
  1285.     DISPLAY                 7-bit characters
  1286.     INPUT TRANSLATION       Off
  1287.     ESCAPE                  Control-Rightbracket
  1288.  
  1289. (*) The VT102 terminal is compatible with the VT100, but  includes  a  few  ad-
  1290. ditional functions.
  1291.  
  1292.  
  1293. The CONNECT Command
  1294.  
  1295. Syntax: CONNECT -or- C
  1296.  
  1297. The  CONNECT  command  establishes  an  interactive  terminal connection to the
  1298. remote system using the currently selected communications port (SET  PORT  COM1
  1299. or  COM2,  COM1  is the default) with all settings currently in effect for that
  1300. port, emulating the currently selected type of terminal.
  1301.  
  1302. During CONNECT, the characters you type are sent out  the  communication  port,
  1303. and  the  characters that arrive at the port are displayed on the screen or in-
  1304. terpreted by the selected  terminal  emulator.    If  you  SET  LOCAL-ECHO  ON,
  1305. MS-Kermit itself will display the characters you type on the screen.
  1306.  
  1307. Before  you issue the CONNECT command, be sure to set the correct communication
  1308. speed (SET SPEED) and any other necessary communication  parameters  (e.g.  SET
  1309. PARITY,  SET LOCAL-ECHO).  If you have SET DEBUG ON, then (on most DOS systems,
  1310. particularly the IBM PC), received control characters will be displayed in spe-
  1311. cial notation and no particular terminal will be emulated.
  1312.  
  1313. By  default,  7-bit  ASCII  characters are displayed on the screen.  If you SET
  1314. DISPLAY 8, then 8-bit characters will be used (useful for "national"  character
  1315. sets).  Character translation will be done according to any SET TRANSLATION IN-
  1316. PUT and SET KEY commands you have issued.  In  addition,  characters  that  are
  1317. sent  to the screen will also be recorded in a disk file or on a printer if you
  1318. have issued a LOG SESSION command.
  1319.  
  1320. The CONNECT command turns your PC into a terminal to the other  computer.    To
  1321. get  back  to  the  PC, type the escape character followed by the letter C (for
  1322. "Close connection").  On most MS-DOS systems the  escape  character  is  Ctrl-]
  1323. (Control-Rightbracket).    That  means,  hold down the Ctrl key, press "]", and
  1324. then type the letter C.
  1325.  
  1326.     Kermit-MS>connect        Connect to remote system.
  1327.  
  1328.       Conduct terminal session here...
  1329.  
  1330.     ^]c                      Escape back to PC.
  1331.     Kermit-MS>               Prompt reappears.
  1332.  
  1333. This is called "escaping back".  You can use the SET ESCAPE command  to  change
  1334. the escape character to something besides "^]", or you can assign the escaping-
  1335. back operation to a single key or key combination with SET KEY (on the  IBM  PC
  1336. the default for this is Alt-X).
  1337.  
  1338. You can include the CONNECT command in a TAKE command file, but not "bare" text
  1339. to be sent to the remote system during CONNECT (use scripts for that, see  Sec-
  1340. tion  1.8).    When a TAKE file includes a CONNECT command, no further commands
  1341. will be executed from the file until after you escape back.  A curious side ef-
  1342. fect  of  allowing  Kermit  to accept input redirected from a file or device is
  1343. that Connect mode will read characters from that file  or  device;  not  really
  1344. that useful but it works if you happen to need it.
  1345.  
  1346. When  you CONNECT, the program attempts to raise the DTR and RTS RS-232 signals
  1347. (see Table 1-3), and it takes no specific action to lower them unless  you  ex-
  1348. plicitly issue the HANGUP command; thus you can EXIT from Kermit-MS and restart
  1349. it without dropping a dialup connection.  While CONNECTed, you can  communicate
  1350. directly  with  an  autodialer  or  "smart modem" to control the communications
  1351. line, hang it up, and the like, for instance, by typing AT commands to a Hayes-
  1352. like modem.
  1353.  
  1354.     Kermit-MS>set speed 2400 (See Section 1.6.10)
  1355.     Kermit-MS>connect
  1356.     AT                       Now you're talking to the modem.
  1357.     OK                       Your modem responds
  1358.     ATDT8765432              Type the modem's dialing command.
  1359.     RINGING
  1360.     CONNECT 2400
  1361.     Welcome to ...           Now you're talking to the host computer.
  1362.     Please login:
  1363.  
  1364. MS-Kermit  makes  no attempt to monitor the modem's Carrier Detect (CD) or Data
  1365. Set Ready (DSR) signals (see Table 1-3), and will take no notice if they  drop.
  1366. Thus  it is not possible to automatically terminate a session if the connection
  1367. is broken.  However, you may query or test the status of  these  modem  signals
  1368. yourself using Kermit's SHOW MODEM, SHOW COMMUNICATIONS, and WAIT commands.
  1369.  
  1370. -------------------------------------------------------------------------------
  1371.  
  1372.  
  1373.   Signal DB25 DB9 Description
  1374.    FG     1   -   Frame (protective) ground
  1375.    TD     2   3   Transmitted data (from PC to modem)
  1376.    RD     3   2   Received data (by PC from modem)
  1377.    RTS    4   7   Request to Send (by PC)
  1378.    CTS    5   8   Clear to Send (by modem)
  1379.    DSR    6   6   Dataset Ready (Modem is turned on)
  1380.    SG     7   5   Signal Ground
  1381.    CD     8   1   Carrier Detect (Modem is communicating with remote modem)
  1382.    DTR   20   4   Data Terminal Ready (PC is online)
  1383.    RI    22   9   Ring Indicate (Modem tells PC phone is ringing)
  1384.  
  1385.                       Table 1-3:  RS-232-C Modem Signals
  1386.  
  1387. -------------------------------------------------------------------------------
  1388.  
  1389. When  using Kermit to connect two PCs "back to back," SET LOCAL-ECHO ON so that
  1390. when you CONNECT to the other PC to send messages to its operator, you can  see
  1391. what  you  are typing.  You should also SET TERMINAL NEWLINE ON, so that that a
  1392. linefeed will be automatically supplied for each carriage return you type.
  1393.  
  1394.  
  1395. The HANGUP Command
  1396.  
  1397. On serial port connections, the HANGUP command attempts  to  momentarily  lower
  1398. the modem signals DTR and RTS (Table 1-3).  It may be used to hang up the phone
  1399. when dialed up through a modem, or to get  the  attention  of  port  contention
  1400. units or terminal concentrators that operate in this manner.  On direct connec-
  1401. tions, it will probably have no effect.  On local area network connections, the
  1402. network  session  is  fully  terminated.    HANGUP  affects  only the currently
  1403. selected port.
  1404.  
  1405.  
  1406. TERMINAL EMULATION
  1407.  
  1408. The IBM PC version of Kermit-MS emulates the DEC VT102 terminal by default, and
  1409. may  also  be  instructed  to  emulate  the  DEC VT52, the Heath/Zenith-19, the
  1410. Tektronix 4010 graphics terminal, or no terminal at all,  selectable  with  the
  1411. SET  TERMINAL  command  (or  you may "toggle" among the different emulations by
  1412. typing the Alt-Minus key).  Emulation of each of these terminals is nearly com-
  1413. plete.    VT102  emulation  lacks  only  smooth scroll and 132 column mode (132
  1414. column mode is supported for a number of popular EGA and VGA boards).   Double-
  1415. height,  double-width  characters  are  supported, but simulated using ordinary
  1416. characters.
  1417.  
  1418. The IBM PC's 40-column (large character) screen mode may be used during CONNECT
  1419. (but you may also have to inform the remote host that your screen width is 40).
  1420. This can provide improved readability to  visually  impaired  persons.  To  use
  1421. 40-column  mode,  enter  the  DOS  command  "MODE 40" (or CO40 or BW40).  Other
  1422. screen sizes are also sensed and used automatically, provided you have set them
  1423. from DOS, before starting Kermit.
  1424.  
  1425. On  color  monitors,  the foreground and background colors may be set using SET
  1426. TERMINAL COLOR, and inverse/normal video display may also  be  selected,  along
  1427. with  many other terminal parameters.  A complete list of the commands, default
  1428. key configurations, and escape sequences accepted by the IBM PC Kermit terminal
  1429. emulator  is  given  in  section 1.17.1.  Non-IBM-compatible PCs have different
  1430. terminal emulation options.  See section 1.11.
  1431.  
  1432.  
  1433. Escape-Level Commands
  1434.  
  1435. The escape character, normally Control-], is used to regain  the  attention  of
  1436. Kermit-MS  during  CONNECT  (you  can  change  the  escape  character using SET
  1437. ESCAPE).  When you type the escape character, Kermit-MS waits for you to follow
  1438. it with a single character command.  For instance, the single character command
  1439. "?" produces a list of available single character commands.   This  command  is
  1440. executed immediately; it may not be edited, and the program does not wait for a
  1441. carriage return to confirm it.  Table 1-4 shows CONNECT  escape-level  commands
  1442. available  in  Kermit-MS.    Typing  any other character (except the space bar,
  1443. which is the "null command") after the escape character will cause Kermit-MS to
  1444. beep,  but will do no harm.  These actions are also Kermit action verbs and can
  1445. be assigned to single keys.  See SET KEY for details.
  1446.  
  1447.  
  1448. The Mode Line
  1449.  
  1450. When you first issue the CONNECT command, a message (on some  systems,  an  in-
  1451. verse  video  "mode line") will display the most important facts about the con-
  1452. nection you've just established, so that you can quickly diagnose any problems.
  1453. Here's what the IBM PC mode line looks like:
  1454.  
  1455. Esc-chr:^] help:^]? port:1 speed:9600 parity:odd echo:rem VT102 .... PRN
  1456.  
  1457. This  shows that the escape character is Ctrl-Rightbracket, that you would type
  1458. Ctrl-rightbracket followed by question mark ("^]?") to get help during CONNECT,
  1459. that  you are connected on port 1 at 9600 baud with odd parity and remote echo,
  1460. and that a VT102 terminal is being emulated.    The  four  dots  represent  the
  1461. VT102s LEDs (they turn into the digits 1,2,3,4 when "lit") and PRN will show up
  1462. if the printer is activated (e.g. by Ctrl-PrintScreen).
  1463.  
  1464. -------------------------------------------------------------------------------
  1465.  
  1466.  
  1467.     ?   Help -- Lists the available single-character commands.
  1468.     0   (the digit zero) Transmit a NUL (ASCII 0).
  1469.     B   Transmit a BREAK signal.
  1470.     L   Transmit a Long BREAK signal (on some systems).
  1471.     C   Close the connection and return to Kermit-MS prompt level.
  1472.     H   Hangup the phone by lowering DTR and CTS momentarily.
  1473.     F   File the current screen in the screen dump file.
  1474.     M   Toggle the mode line, i.e. turn it off if it is on or vice versa.
  1475.     P   Push to DOS; get back to CONNECT by typing EXIT.
  1476.     Q   Temporarily quit logging the remote session.
  1477.     R   Resume logging the remote session.
  1478.     S   Show the status of the connection.
  1479.     ^]  (or whatever you have set the escape character to be)
  1480.         Typing the escape character twice sends one copy of it to the connected
  1481.         host.
  1482.  
  1483.         Table 1-4:  Kermit-MS Single-Character CONNECT Escape Commands
  1484.  
  1485. -------------------------------------------------------------------------------
  1486.  
  1487. The mode line may be turned on and off using SET MODE, or  the  CONNECT  escape
  1488. character followed by the letter M.
  1489.  
  1490.  
  1491. Screen Rollback
  1492.  
  1493. On  the  IBM  PC  and  some  other  systems (see Table 1-7), Kermit-MS provides
  1494. several pages of screen memory which let you recall earlier  terminal  screens.
  1495. These  may  be  scrolled up and down using keys as shown in Table 1-8.  For in-
  1496. stance, the IBM PC uses PgUp (previous screen), PgDn (next  screen),  Ctrl-PgUp
  1497. and  Ctrl-PgDn  (one  line  at  a  time),  Home (top of screen memory), and End
  1498. (bottom of screen memory).  Lines that scroll off the top  of  the  screen  are
  1499. saved.    When an application clears the screen using a recognized screen-clear
  1500. sequence (ESC [ 2 J), the whole screen is saved.  The  screen  scrolling  func-
  1501. tions may be assigned to different keys with the SET KEY command.
  1502.  
  1503. If  you  have  rolled the screen back and a new character must be displayed, it
  1504. will normally appear at the current cursor position on the old screen.  This is
  1505. useful  when  you  are trying to copy something from a previous screen.  If you
  1506. wish new characters to appear in their proper place on the "newest" screen, you
  1507. can SET TERMINAL ROLL ON.
  1508.  
  1509. The  number  of  lines  in the roll back buffer depends on the machine, 10 full
  1510. screens for IBM PCs and DEC Rainbows, and on the amount of memory available  in
  1511. the  machine.  Each  screen needs 4KB on IBM PCs. Denser displays receive fewer
  1512. roll back lines.
  1513.  
  1514.  
  1515. Screen Dump
  1516.  
  1517. The screen dump feature writes the contents of the current  screen  to  a  file
  1518. (KERMIT.SCN  unless another file was selected by the SET DUMP command) when the
  1519. CONNECT escape-level command F is typed.  The screen dump file is  appended  to
  1520. on  each  successive  screen  dump,  with  each  screen separated by a formfeed
  1521. (Ctrl-L).  This feature may be used in conjunction with screen  rollback  --  a
  1522. handy  way  to recapture screenfuls of laboriously typed-in text after a remote
  1523. host has crashed without saving your work.  The corresponding  action  verb  is
  1524. "dump".  Screen dump does not function when in Tektronix graphics mode; instead
  1525. one of many graphics screen capture programs may be used independently commonly
  1526. via the DOS Shift PrtSc key combination or by LOGging the incoming byte stream.
  1527.  
  1528. A  screen  dump  differs  from  a session log in two ways.  First, each desired
  1529. screen must be manually filed, and  second,  the  screen  dump  file  has  been
  1530. stripped of any escape sequences, whereas the session log records them (see LOG
  1531. SESSION).
  1532.  
  1533.  
  1534. Printer Control
  1535.  
  1536. During terminal emulation, a locally attached printer may be controlled in  the
  1537. normal  manner,  on  most  systems.  Pushing the "Print Screen" key (shifted on
  1538. some systems) will cause the current contents of the screen to  be  printed  by
  1539. DOS; holding down Ctrl while depressing Print Screen will alternately start and
  1540. stop the spooling of incoming characters to the printer.  On the  IBM  PC,  the
  1541. mode line will show PRN when the printer is activated in this manner.  ^P or ^N
  1542. are sent to the host during terminal emulation and do not  toggle  printing  as
  1543. they  do  when  you're talking directly to DOS.  CTRL-Print-Screen can be simu-
  1544. lated with the Kermit-MS LOG PRN  and  CLOSE  commands.    VT102  (ANSI)  style
  1545. host-controlled transparent printing is also supported on the IBM PC.  See sec-
  1546. tion 1.18.6 for technical information about MS-Kermit's printer control.
  1547.  
  1548. Unix users may use the following shell script to print files on a  locally  at-
  1549. tached printer:
  1550.  
  1551.     #!/bin/sh
  1552.     # pcprint
  1553.     # usage: pcprint file(s)
  1554.     #  or <any UNIX process that writes to standard output> | pcprint
  1555.     #
  1556.     echo -n '<ESC>[5i'
  1557.     if [ $# -eq 0 ]; then
  1558.       cat
  1559.     else
  1560.       cat $*
  1561.     fi
  1562.     echo -n '<ESC>[4i'
  1563.  
  1564. Note  that  "<ESC>"  above should be replaced by a real Escape, ASCII character
  1565. 27.
  1566.  
  1567.  
  1568. Graphics
  1569.  
  1570. MS-Kermit on the IBM PC, compatibles, and several other systems, is capable  of
  1571. emulating  a Tektronix 4010 graphics terminal, for use with host-based software
  1572. that can generate Tektronix control codes.  When you enter Tektronix emulation,
  1573. your  cursor will disappear.  Don't be alarmed, this is how Tektronix terminals
  1574. behave.
  1575.  
  1576. The Tektronix emulator implements a mixture of Tek 4010 and  4014  features  to
  1577. draw  characters,  lines, and dots in graphics mode.  These Tektronix terminals
  1578. have a graphics display 780 dots high by 1024 dots wide.  They use storage tube
  1579. technology  whereby  a  dot  stays illuminated until the full screen is erased.
  1580. They also lack cursor keys.  Kermit's Tek emulator maps the  1024  by  780  dot
  1581. display  to  the  PC's  current screen dimensions, say 640 across by 200 or 350
  1582. dots high, and retains limited use of the cursor keys.  It automatically senses
  1583. the  active  display adapter (EGA, CGA, Hercules, Mono, and AT&T/Olivetti style
  1584. 640x400) and retains screen coloring (EGA) and the current graphics image  (EGA
  1585. and  Hercules)  if the adapter has sufficient memory.  Automatic sensing can be
  1586. manually overriden to select a particular display mode, such as VGA  (640x480),
  1587. by  SET  TERMINAL  GRAPHICS <display type>. Pure monochrome systems, of course,
  1588. lack a graphics capability; in this case Kermit approximates the graphic  image
  1589. by writing dots as plus signs.
  1590.  
  1591. Tektronix graphics mode is entered two different ways, automatically and volun-
  1592. tarily:
  1593.  
  1594.    1. Automatically (which you can prevent via the Kermit command  DISABLE
  1595.       TEK).   While emulating a VT102, VT52, or Heath-19, reception of the
  1596.       byte pair ESCAPE Control-L causes the PC to change to graphics mode,
  1597.       clear  the  screen,  and  obey  new  input as Tektronix commands.  A
  1598.       second  automatic  entry  is  reception  of  the   escape   sequence
  1599.       "ESC  [  ?  3 8 h" which does the same as above except the screen is
  1600.       not cleared.  Automatic  mode  is  exited  by  either  reception  of
  1601.       Control-X or "ESC [ ? 3 8 l" (lower case L), or by toggling the ter-
  1602.       minal type (ALT minus, Kermit verb\KTermtype) to VT102, or something
  1603.       other  than TEK.  (These "ESC [ ? 3 8 h/l" sequences derive from the
  1604.       DEC VT340 terminal.)
  1605.  
  1606.    2. Voluntary mode is when terminal type TEK4010 is selected by the Ker-
  1607.       mit  command  SET  TERMINAL  TEK4010  or  by  toggling  to  it using
  1608.       Alt-Minus.  It is exited by SET TERMINAL another-kind or by toggling
  1609.       to another kind.  ENABLE or DISABLE TEK and the exit-Tek-mode escape
  1610.       sequences are not applicable to voluntary mode.
  1611.  
  1612. Here are several common questions about Tek mode, and their answers:
  1613.  
  1614.    1. "How do I  escape  from  graphics  mode  back  to  being  a  regular
  1615.       terminal?"    Within  CONNECT mode, you can type the \KTermtype key,
  1616.       which is assigned by default to Alt-Minus.    Repeated  pressing  of
  1617.       this  key  "toggles"  among  Kermit's  terminal  types, VT102, VT52,
  1618.       Heath-19, and Tektronix.  You can also escape back to Kermit-MS com-
  1619.       mand  level and issue an explicit SET TERMINAL command to change the
  1620.       terminal type.
  1621.  
  1622.    2. "How can I return to the graphics screen without erasing it?"    The
  1623.       graphics screen is preserved if your graphics adapter has sufficient
  1624.       memory (see Table 1-5).  In this case, both your text  and  graphics
  1625.       screens  will  be preserved when you toggle back and forth between a
  1626.       character terminal (e.g. VT102) and Tektronix.
  1627.  
  1628.    3. "How do I erase the graphics screen?"  You can type the \KReset key,
  1629.       which  is normally assigned to Alt-=.  The screen also clears if the
  1630.       host sends a Control-L or ESC Control-L.
  1631.  
  1632.    4. "How do I print or save the graphics screen?"  Kermit does not  cur-
  1633.       rently  provide  a  way  to  do  this, but you can load drivers like
  1634.       GRAPHICS.COM alongside Kermit for this purpose.
  1635.  
  1636. While acting as a Tek terminal Kermit uses the keyboard translation appropriate
  1637. to  the  VT102 terminal.  However, received escape sequences are interpreted by
  1638. the Tek emulator and VT102 escape codes are inoperative.  The Tek emulator  ab-
  1639. sorbs  the  ESCAPE  and  following  character and treats any additional unknown
  1640. items as ordinary text.
  1641.  
  1642. The emulator can display text characters from a built-in 8-by-8  dot  font  for
  1643. characters  Space  through  DELete  (no  control codes nor special characters).
  1644. Tabs are converted to single spaces. Only the low 7 bits of the  character  are
  1645. used.
  1646.  
  1647. While in Tek mode the emulator behaves as a simple TTY device for ordinary text
  1648. and as a line or dot drawing Tektronix device  for  commands  listed  in  Table
  1649. 1-10.   The screen resolution is governed by the kind of active display adapter
  1650. and monitor in the PC (Table 1-5).    Kermit  senses  this  automatically  when
  1651. graphics  mode  is  entered.   Graphics are saved on page one of screen memory.
  1652. Coloring is determined by the  current  terminal  status,  either  the  default
  1653. screen or that overridden by the command SET TERMINAL COLOR.
  1654.  
  1655. The technical details of Tektronix emulation are presented in section 1.17.7.
  1656.  
  1657. -------------------------------------------------------------------------------
  1658.  
  1659. Display Adapter Display       Mode    Screen Resolution and Coloring
  1660. VGA             Hi res color  18      640x480, graphics saved (407 lines),
  1661.  
  1662.                                        16 colors.
  1663. VGA             Monochrome    17      640x480, graphics saved (407 lines)
  1664. EGA w/256KB     Hi res color  16 dec  640x350, graphics saved, 16 colors.
  1665.                 Med res color 14      640x200, graphics saved, 8 colors.
  1666.                 Monochrome    15      640x350, graphics saved, b/w.
  1667. EGA w/64KB      Hi res color  16      640x350, graphics not saved,
  1668.                                        4 colors of red, white, blue, black.
  1669.                 Med res color 14      640x200, graphics saved, 8 colors.
  1670.                 Monochrome    15      640x350, graphics not saved.
  1671. CGA             Color         6       640x200, graphics not saved, b/w.
  1672. Hercules        Monochrome    none    720x348, graphics saved if memory.
  1673. Monochrome      Monochrome    7       80 by 25 text, graphics not saved.
  1674. AT&T/Olivetti   any           72      640x400, grahics not saved, b/w.
  1675. DEC VAXMATE     any           208     640x400, graphics not saved, b/w.
  1676. TOSHIBA T3100   any           116     640x400, graphics not saved, b/w.
  1677.  
  1678.   Table 1-5:  Adapters Supported by IBM PC MS-Kermit for Tektronix Emulation
  1679.  
  1680. -------------------------------------------------------------------------------
  1681. 1.6.4. COMMANDS FOR FILE TRANSFER
  1682.  
  1683. MS-Kermit's SEND, GET, and RECEIVE invoke the Kermit file transfer protocol for
  1684. error-checked transmission  of  files  between  MS-Kermit  and  another  Kermit
  1685. program  on the other end of the connection.  There are also commands for "raw"
  1686. transfer of files (no error checking)  with  systems  that  don't  have  Kermit
  1687. programs:  LOG  SESSION (for capturing text files on your PC) and TRANSMIT (for
  1688. uploading text files to the remote system).  The LOG TRANSACTION command  opens
  1689. a file to record the status, time, date, names, sizes of each file transfer.
  1690.  
  1691. During file transfer, MS-Kermit normally displays its progress on the screen as
  1692. shown in Figure 1-1.  The items in the right-hand column are  updated  more  or
  1693. less  at  random.  The percent done is always filled in when sending files, and
  1694. when receiving if  the  other  Kermit  sends  the  file's  size  in  a  special
  1695. file-attribute  packet.   The number of retries indicates how many times Kermit
  1696. had to correct transmission errors.  Several other file transfer display format
  1697. options are also available; see SET DISPLAY.
  1698.  
  1699. -------------------------------------------------------------------------------
  1700.  
  1701.  
  1702.                Kermit-MS: V2.32  11 Dec 1988
  1703.  
  1704.                File name: FOT.
  1705.       KBytes transferred: 7
  1706.      Percent transferred: 52%
  1707.                  Sending: In progress
  1708.  
  1709.        Number of packets: 74
  1710.            Packet length: 93
  1711.        Number of retries: 2
  1712.               Last error: None
  1713.             Last warning: None
  1714.  
  1715.               Figure 1-1:  MS-Kermit File Transfer Display Screen
  1716.  
  1717. -------------------------------------------------------------------------------
  1718.  
  1719. Although  MS-Kermit  makes  no  distinction between text and binary files, most
  1720. other Kermit programs do.  Therefore, before you  attempt  to  transfer  binary
  1721. files with another type of system (say, a VAX, or an IBM mainframe), be sure to
  1722. give the appropriate command -- usually SET FILE TYPE BINARY -- to  the  Kermit
  1723. on the remote end.  Kermit-MS itself neither has nor needs the command SET FILE
  1724. TYPE, because the MS-DOS format for text files is exactly the same as  Kermit's
  1725. text-file  transfer  format,  which means that MS-Kermit never needs to convert
  1726. file data, no matter whether it be text or binary.
  1727.  
  1728. File transfers involving floppy disks will be slow and noisy.  Hard  disks  are
  1729. much  faster  (and  quieter),  and RAM disks faster still (and totally silent).
  1730. But if you store new files on a RAM disk, be sure to move them to a  real  disk
  1731. before turning off your PC.
  1732.  
  1733. Before  attempting  to transfer files to the PC, make sure you have enough room
  1734. on the selected device.  Kermit does not provide a way for you to change  disks
  1735. during  a file transfer.  However, the Kermit protocol will help you out a lit-
  1736. tle bit by attempting to prevent transfer of files that are too big to  fit  in
  1737. the  available space.  As of version 2.31, MS-Kermit supports "file attributes"
  1738. exchange, and if the other Kermit supports this option too, then the  receiving
  1739. program  will  check  free  disk  space  before  letting  the transfer proceed.
  1740. MS-Kermit allows a margin of 6 percent inflation upon reception,  because  file
  1741. construction  differs  markedly  between systems.  A multiple-file transfer can
  1742. even skip automatically past files that are too big, allowing the  little  ones
  1743. to pass though.
  1744.  
  1745. Other  attributes  exchanged  by MS-Kermit include the file's creation date and
  1746. time, and the system of origin.  When two Kermit programs both  have  attribute
  1747. capability,  then files will be stored with the same timestamp on the receiving
  1748. system as they had on the sending system.
  1749.  
  1750. Since exchange of attributes is a new feature to MS-Kermit,  and  a  relatively
  1751. scarce  one  elsewhere,  it  is  possible that two Kermit programs might misun-
  1752. derstand each other because of differing interpretations  by  the  programmers,
  1753. and  this  could prevent otherwise normal file transfers from taking place.  An
  1754. escape clause is provided by  the  command  SET  ATTRIBUTES  OFF,  which  makes
  1755. MS-Kermit forget that it has attribute capability.
  1756.  
  1757. You  may  record  the  progress of a file transfer in a log file by issuing the
  1758. command LOG TRANSACTIONS.
  1759.  
  1760.  
  1761. The SEND Command
  1762.  
  1763. Syntax:  SEND filespec1 [filespec2]
  1764.  
  1765. The SEND command causes a file or file group to be sent from the  local  MS-DOS
  1766. system to the Kermit on the remote system.  The remote Kermit may be running in
  1767. server or interactive mode; in the latter case, you should already  have  given
  1768. it  a  RECEIVE  command and escaped back to your PC.  S is a special non-unique
  1769. abbreviation for SEND.
  1770.  
  1771. filespec1 may contain the  wildcard  characters  "*"  to  match  zero  or  more
  1772. characters  within  a  field, and/or "#" (first position) or "?" (elsewhere) to
  1773. match any single character (a question mark in first position gives you a  help
  1774. message).    If  filespec1 contains wildcard characters then all matching files
  1775. will be sent, in the same order that MS-DOS would  show  them  in  a  directory
  1776. listing.    If  filespec1  specifies a single file, you may direct Kermit-MS to
  1777. send that file with a different name, given in filespec2, as in:
  1778.  
  1779.     Kermit-MS>send foo.bar framus.widget
  1780.  
  1781. filespec2 begins with the first nonblank character  after  filespec1  and  ends
  1782. with  the  carriage return; thus it may contain blanks or other unusual charac-
  1783. ters that may be appropriate on the target machine.   The  alphabetic  case  of
  1784. text  in filespec2 is preserved in transmission, so if case matters on the tar-
  1785. get system, be sure to type filespec2 appropriately.
  1786.  
  1787. If the SEND command is specified by itself on the command line, then  you  will
  1788. be  prompted  separately for the name of the file to send, and the name to send
  1789. it under:
  1790.  
  1791.     Kermit-MS>send
  1792.      Local Source File: c:\stuff\xcom1.txt
  1793.      Remote Destination File: com1.txt
  1794.  
  1795. If a file can't be opened for read access, the message "Unable  to  find  file"
  1796. will be shown or else the standard MS-DOS recovery procedures will take place:
  1797.  
  1798.     Not ready error reading drive A
  1799.     Abort, Retry, Ignore?
  1800.  
  1801. Kermit remains active even if you select "Abort" (DOS's word, not ours).
  1802.  
  1803. Files  will  be  sent  with  their  MS-DOS  filename and filetype (for instance
  1804. FOO.TXT, no device or pathname).  Special characters in the file name  are  not
  1805. converted.    If there is no filetype, then only the name will be sent, without
  1806. the terminating dot.  Each file is sent as is, with no conversions done on  the
  1807. data,  except  for  possibly stopping at a terminating Control-Z character (see
  1808. the SET EOF command).
  1809.  
  1810. Once you give Kermit-MS the SEND command, the name of each file  will  be  dis-
  1811. played  on your screen as the transfer begins.  Packet, retry, and other counts
  1812. will be displayed along with informational messages during the transfer, in the
  1813. style  specified  by SET DISPLAY.  If the file is successfully transferred, you
  1814. will see "Complete", otherwise there will  be  an  error  message.    When  the
  1815. specified operation is done, the program will sound a beep.
  1816.  
  1817. Several  single-character  commands  may  be  given while a file transfer is in
  1818. progress:
  1819.  
  1820.   ^X  (Control-X) Stop sending the current file and go on to the next  one,  if
  1821.       any.
  1822.  
  1823.   ^Z  Stop sending this file, and don't send any further files.
  1824.  
  1825.   ^C  Return to Kermit-MS command level immediately without sending any kind of
  1826.       notification to the remote system.  (^Z or even ^E is preferable.)
  1827.  
  1828.   ^E  Like ^C, but send an Error packet to the remote Kermit in an  attempt  to
  1829.       bring it back to server or interactive command level.
  1830.  
  1831.   CR  Simulate a timeout: resend the current packet, or NAK the expected one.
  1832.  
  1833. Control-X,  Control-Z,  and  Control-E send the proper protocol messages to the
  1834. remote Kermit to bring it gracefully to the desired state.    Control-C  leaves
  1835. the  remote  Kermit in whatever state it happens to be in, possibly retransmit-
  1836. ting its last packet over and over, up to its retry limit.    You  should  only
  1837. have  to  use  Control-C  in  dire emergencies (the remote Kermit is stuck, the
  1838. remote system crashed, etc), or at those times when you realize that  you  have
  1839. given a file transfer command to Kermit-MS without first having told the remote
  1840. Kermit about it.
  1841.  
  1842. MS-Kermit does not have a built-in mechanism for sending  an  entire  directory
  1843. structure,  but  this  may still be done using command files.  A program called
  1844. XSEND, distributed along with MS-Kermit, will construct  such  a  command  file
  1845. automatically.
  1846.  
  1847.  
  1848. The RECEIVE Command
  1849.  
  1850. Syntax: RECEIVE [filespec]
  1851.  
  1852. The  RECEIVE  command  tells Kermit-MS to receive a file or file group from the
  1853. other system.  The file is stored under the name it was transmitted  with,  ex-
  1854. cept  that  any  illegal characters are translated to X's.  Kermit-MS passively
  1855. waits for the file to arrive; this command is not to be used when talking to  a
  1856. Kermit  server  (use GET for that).  You should already have issued a SEND com-
  1857. mand to the remote Kermit and escaped back  to  Kermit-MS  before  issuing  the
  1858. RECEIVE command.  The RECEIVE command is intended for situations where the file
  1859. name and sending operation originates at the other side; GET originates the re-
  1860. quest  from our side and asks the server to perform the operation.  R is a spe-
  1861. cial non-unique abbreviation for RECEIVE.
  1862.  
  1863. If the optional filespec is provided, incoming files will be stored under  that
  1864. name.    If  the filespec is really just a path then files are stored where the
  1865. path indicates.  If it is an actual filename the first incoming file is renamed
  1866. and any additional files either overwrite the first (if FILE WARNING is OFF) or
  1867. are renamed slightly from the filespec (digits are added to the end of the main
  1868. filename  part  before  the  dot  and  extension)  if  FILE  WARNING is ON (the
  1869. default). The filespec may include any combination of the following fields:
  1870.  
  1871.   Device designator
  1872.       Store  the  file  on  the designated device, in the current directory for
  1873.       that device.  If no device designator is given, store it on  the  current
  1874.       default device.
  1875.  
  1876.   Directory path
  1877.       Store the file in the designated directory on the current disk.    If  no
  1878.       path given, store the file in the current directory.
  1879.  
  1880.   File name
  1881.       Store the file under the name given.  If no name is given, store it under
  1882.       the  name it was sent under, converted, if necessary, to suit DOS conven-
  1883.       tions, and modified, if SET WARNING ON, to avoid overwriting any file  of
  1884.       the same name in the same directory.
  1885.  
  1886. If  an  incoming  file does not arrive in its entirety, Kermit-MS will normally
  1887. discard it and it will not appear in your directory.  You may change  this  be-
  1888. havior  by  using  the command SET INCOMPLETE KEEP, which will cause as much of
  1889. the file as arrived to be saved on the disk.
  1890.  
  1891. The same single-character commands are available as during SEND:
  1892.  
  1893.   ^X  Request that the remote Kermit stop sending the current file, and proceed
  1894.       to  the  next  one immediately.  Since this is an optional feature of the
  1895.       Kermit protocol, the remote Kermit might not honor the request.
  1896.  
  1897.   ^Z  Request that the remote Kermit terminate the  entire  transfer;  this  is
  1898.       also  an  optional feature that may or may not be supported by the remote
  1899.       Kermit.
  1900.  
  1901.   ^C, ^E, and CR operate in the same way as they do during SEND.  In this case,
  1902.       ^E should always do what ^Z is supposed to do.
  1903.  
  1904. If  WARNING  is OFF and you type ^X or ^Z to interrupt the transfer, you'll ei-
  1905. ther get a partial new file, or else both the old and the new file of that name
  1906. will  be  lost, depending on SET INCOMPLETE.  In any case, when WARNING is off,
  1907. old files with the same name as incoming files will not survive.
  1908.  
  1909. Caution: If an incoming file's name (the part before the dot) corresponds to an
  1910. MS-DOS device name, such as NUL, COM1, CON, AUX, or PRN, output will go to that
  1911. device, rather than to a file with that name.  This is a feature of MS-DOS.
  1912.  
  1913.  
  1914. 1.6.5. Hints for Transferring Large Files
  1915.  
  1916. During a prolonged file transfer session, things can go wrong that  are  beyond
  1917. Kermit's  control.  The longer the session, the greater the probability it will
  1918. be fatally interrupted.  But you can take a few precautions:
  1919.  
  1920.    - Make sure there is sufficient disk space at the receiving  end.    If
  1921.      possible,  first run a disk utility (such as CHKDSK) to clean out any
  1922.      bad disk blocks.
  1923.  
  1924.    - If you are using a telephone connection, make sure your session won't
  1925.      be  interrupted  by call waiting, people picking up other extensions,
  1926.      etc.
  1927.  
  1928.    - Don't attempt to transfer a single file  of  many  megabytes  over  a
  1929.      telephone connection.  The longer the call, the greater the chance of
  1930.      disconnection (carrier loss).  Although it's a bother,  it  may  save
  1931.      time in the long run to break the file up into smaller pieces, trans-
  1932.      fer the pieces, and then recombine on the other end.
  1933.  
  1934.    - SET INCOMPLETE KEEP on the receiving end, so  that  if  the  transfer
  1935.      fails,  then  the  partial file will be retained.  Then chop the part
  1936.      that wasn't transferred into a separate file, reconnect, and send it.
  1937.      Then join the pieces together.
  1938.  
  1939. Consider moving truly massive amounts of data on magnetic media.  "Never under-
  1940. stimate the bandwidth of  a  station  wagon  full  of  magnetic  tapes!"    (or
  1941. diskettes).
  1942.  
  1943.  
  1944. 1.6.6. Commands for Raw Uploading and Downloading
  1945.  
  1946. MS-Kermit  can  be used to send files to, or capture files from, remote systems
  1947. that do not have Kermit programs available.  No error checking or correction is
  1948. done,  so  the  results can very likely contain corrupted characters, spurts of
  1949. noise, gaps, or extraneous system messages or prompts.  The command for upload-
  1950. ing is TRANSMIT, and for downloading LOG SESSION.
  1951.  
  1952. To  minimize  loss  of  data  during  these  operations,  be  sure  to  SET the
  1953. FLOW-CONTROL and HANDSHAKE parameters to match the characteristics of the  sys-
  1954. tem on the other end.
  1955.  
  1956.  
  1957. The TRANSMIT Command
  1958.  
  1959. Syntax: TRANSMIT filespec [prompt-character]
  1960.  
  1961. The  TRANSMIT  command  provides  a  basic raw upload (export) facility to send
  1962. straight ASCII text files to the  host  without  packets,  error  checking,  or
  1963. retransmissions,  but using all the currently selected communication parameters
  1964. for flow control, parity, etc.  Information is read from the disk file  a  line
  1965. at a time, sent out the serial port, and the command waits for a single charac-
  1966. ter prompt (normally linefeed) from the host before sending the next file line.
  1967. A  disk  file line ends with carriage-return-linefeed (CRLF), but only the car-
  1968. riage return is sent, just as you only type carriage return at  the  end  of  a
  1969. line, not CR and LF.  Most remote systems will echo the CR and then also supply
  1970. a LF, which indicates that they have processed  the  line  and  are  ready  for
  1971. another one.  Setting the prompt to binary zero, \0, makes the TRANSMIT command
  1972. proceed without waiting for a prompt.  Pressing the local Return key  simulates
  1973. arrival of a prompt character.
  1974.  
  1975. Typically,  before  using this command to upload a file, you would start a text
  1976. editor (preferably a line-oriented, rather than  full-screen,  editor)  on  the
  1977. remote  host  and put it into text insertion mode.  When the file has been com-
  1978. pletely transmitted, you would manually enter the required sequence for getting
  1979. the  editor out of text insertion mode, and then make any necessary corrections
  1980. by hand.  Here's an example for VAX/VMS:
  1981.  
  1982.     Kermit-MS>set flow xon/xoff Set flow control to match VAX/VMS.
  1983.     Kermit-MS>connect           Connect to VAX.
  1984.     $ edt foo.txt               Start the EDT editor.
  1985.     *i                          Put it into "insert" mode.
  1986.     ^]c                         Escape back to Kermit-MS.
  1987.     Kermit-MS>transmit foo.txt  Upload the file a line at a time.
  1988.      ...                        The lines are displayed on your screen.
  1989.     Kermit-MS>connect           When done, connect back to the VAX.
  1990.     ^Z                          Type Ctrl-Z to exit EDT insert mode.
  1991.     *exit                       Exit from EDT to save the file.
  1992.     $
  1993.  
  1994. If transmission appears to be stuck, you can wake it up by  typing  a  carriage
  1995. return  on  the  keyboard.    You  can  cancel the TRANSMIT command by typing a
  1996. Control-C.  Control-Z's or other control characters in the file  may  have  ad-
  1997. verse  effects  on the host.  For this reason, you should use TRANSMIT only for
  1998. files that contain 7-bit printing  ASCII  characters,  spaces,  tabs,  carriage
  1999. returns, linefeeds, and possibly formfeeds.
  2000.  
  2001.  
  2002. The LOG SESSION Command
  2003.  
  2004. Syntax: LOG SESSION [filespec]
  2005.  
  2006. The LOG SESSION command lets you copy the characters that appear on your screen
  2007. during CONNECT into the specified file on the PC.  You can use this command  to
  2008. download files by displaying (usually with a command like TYPE) the file on the
  2009. remote system while logging is in effect.  Example:
  2010.  
  2011.     Kermit-MS>set flow xon/xoff Set flow control to match VAX/VMS.
  2012.     Kermit-MS>connect           Connect to the VAX.
  2013.     $ type foo.bar              Give this command, but don't type CR yet.
  2014.     ^]c                         Escape back.
  2015.     Kermit-MS>log session foo.bar                                          
  2016.     Kermit-MS>connect           Connect back.
  2017.                                 Now type the carriage return.
  2018.     This is the file FOO.BAR.   The file is displayed on your screen
  2019.     Blah blah ...               and captured into PC file FOO.BAR.
  2020.     $                           The prompt is captured too.
  2021.     ^]c                         When done, escape back
  2022.     Kermit-MS>close session     and close the log file.
  2023.  
  2024. The PC file FOO.BAR now contains a (possibly  mutilated)  copy  of  the  remote
  2025. computer's  FOO.BAR  file.    It probably has the remote system's prompt at the
  2026. end, which you can edit out.  The session  log  can  also  be  used  to  record
  2027. typescripts,  editing  sessions, Tektronix graphics output, or any other output
  2028. from, or dialog with, the remote computer.
  2029.  
  2030. During terminal emulation, the LOG command records all the characters that  ar-
  2031. rive  from  the  remote host in the specified file, including escape sequences,
  2032. with any input character translations applied according to SET TRANSLATION  IN-
  2033. PUT.    If  you  have  SET  LOCAL-ECHO ON, the characters you type will also be
  2034. recorded.  Logging may be suspended and resumed within a terminal session  with
  2035. the  CONNECT  escape-level  commands  Q and R. The log file will be composed of
  2036. 7-bit ASCII bytes if (a) PARITY is other than NONE, or (b) DISPLAY is SET to 7.
  2037. If  DISPLAY  is 8 and PARITY is NONE, or if DEBUG is ON, then the log will con-
  2038. tain 8-bit bytes.
  2039.  
  2040. You may LOG SESSION PRN to cause the logging information to be printed directly
  2041. on  your  printer.    Any escape sequences that are sent to the screen are also
  2042. sent to the printer.
  2043.  
  2044. If you want to record information without imbedded escape  sequences,  use  the
  2045. screen  dump  feature,  invoked by the CONNECT escape-level command F, which is
  2046. described under the CONNECT command.
  2047.  
  2048. A session log cannot be played back directly on the PC from the log file.    To
  2049. relive the session, you must transfer it to the remote system and display it in
  2050. "binary mode" (e.g. cat in Unix) while CONNECTed.
  2051.  
  2052.  
  2053. 1.6.7. Kermit Server Commands
  2054.  
  2055. Kermit-MS can act as a Kermit server, and can also interact with  other  Kermit
  2056. servers.   Normally, the remote Kermit is put into server mode.  Then the local
  2057. Kermit becomes a "client", and may issue repeated commands to the server  with-
  2058. out  having to connect and escape back repeatedly.  Servers can not only trans-
  2059. fer files, but can also provide a variety of file management  functions.    The
  2060. SERVER command puts MS-Kermit into server mode, and the DISABLE and ENABLE com-
  2061. mands modify the behavior of the server.
  2062.  
  2063. Kermit servers respond only to information sent as Kermit protocol packets  and
  2064. not  to  ordinary CONNECT-mode commands.  When MS-Kermit is the client, it uses
  2065. the SEND command (described above) to send files to a server, the  GET  command
  2066. (not  RECEIVE)  to  get  files from a server, the REMOTE commands to invoke the
  2067. file management functions of the server, and the BYE, FINISH,  or  LOGOUT  com-
  2068. mands  to  shut  down the server.  The MS-Kermit server can also be returned to
  2069. interactive mode by typing Ctrl-C or Ctrl-Break on the PC's  console  keyboard;
  2070. if  the SERVER command was issued from a command file, execution of the command
  2071. file will resume with the next command after SERVER.
  2072.  
  2073.  
  2074. The SERVER Command
  2075.  
  2076. Syntax: SERVER [timeout]
  2077.  
  2078. Kermit-MS is capable of acting as a full-fledged Kermit server for users coming
  2079. in  through  one  of  the  communication ports or a local area network.  To put
  2080. Kermit-MS into server mode, first issue any desired SET commands to select  and
  2081. configure the desired port, then DISABLE any undesired functions, and then type
  2082. the SERVER command.  Kermit-MS will await all  further  instructions  from  the
  2083. client  Kermit  on  the other end of the connection, which may be hardwired, or
  2084. connected through a network or autoanswer modem.
  2085.  
  2086. In the following example, a Kermit server is set up for dialing in:
  2087.  
  2088.     Kermit-MS>set port 1
  2089.     Kermit-MS>set speed 1200
  2090.     Kermit-MS>hangup
  2091.     Kermit-MS>connect
  2092.     ATS0=1
  2093.     OK
  2094.     ^]c
  2095.     Kermit-MS>set server timeout 0
  2096.     Kermit-MS>set warning on
  2097.     Kermit-MS>disable all
  2098.     Kermit-MS>server
  2099.  
  2100. Before putting Kermit in server mode in this case it was necessary  to  connect
  2101. to  the  modem  (in  this  example, a Hayes) and put it into autoanswer mode by
  2102. typing the  ATS0=1  command.  Since  Kermit  packets  typically  start  with  a
  2103. Control-A  character check the modem's manual to ensure that character is not a
  2104. modem command signal; some brands regard Control-A as a hangup request!
  2105.  
  2106. Note the command SET SERVER TIMEOUT 0.  This disables  the  MS-Kermit  server's
  2107. normal behavior of timing out periodically and sending a NAK packet while wait-
  2108. ing for a connection.  This might be necessary with certain modems or PBXs that
  2109. can  be taken out of answer mode if they receive any characters from the PC be-
  2110. fore a call is received.
  2111.  
  2112. An optional timeout value can be specified to exit server mode automatically at
  2113. a certain time.  The timeout can be expressed as a number, meaning seconds from
  2114. now, or as the hh:mm:ss form, in 24-hour time of day.    Both  forms  recognize
  2115. times  greater  than  12 hours from now as being in the past.  For instance, if
  2116. you want to run a Kermit server for an hour, and then  have  it  exit  so  that
  2117. another program can run, use a command file like:
  2118.  
  2119.     set port 1        ; Use COM1
  2120.     set speed 2400    ; at 2400 bps.
  2121.     disable all       ; Only allow file transfers in current directory.
  2122.     server 3600       ; Be a server for 3600 seconds = 1 hour.
  2123.     exit              ; Exit when done.
  2124.  
  2125. MS-Kermit 2.32 server mode supports the following requests:
  2126.  
  2127.     SEND           REMOTE CWD (CD)     REMOTE MESSAGE
  2128.     GET            REMOTE DELETE       REMOTE SEND
  2129.     FINISH         REMOTE DIRECTORY    REMOTE SPACE
  2130.     BYE            REMOTE HELP         REMOTE TYPE
  2131.     LOGOUT         REMOTE HOST         REMOTE WHO
  2132.                    REMOTE LOGIN
  2133.  
  2134. REMOTE CWD (CD) can be used to change both directories and devices.  The REMOTE
  2135. MESSAGE command accepts a one line message on the command line  which  will  be
  2136. displayed  on  the  operator's console.  An MS-Kermit Server can DISABLE recog-
  2137. nition of selected REMOTE commands to help reduce accidents.
  2138.  
  2139.     CAUTION: The method used for most of the REMOTE commands is to invoke a
  2140.     task  with  the user's command line, redirect standard output to a tem-
  2141.     porary file, $KERMIT$.TMP, send that file back to the remote  end,  and
  2142.     then delete the file.  Sufficient space must be available to store this
  2143.     file.  To service DOS commands or user tasks COMMAND.COM  must  be  lo-
  2144.     cated on the DOS PATH.
  2145.  
  2146.     FURTHER  CAUTION:  Any  of these DOS tasks or programs may encounter an
  2147.     error, and in that case, DOS will generally put  the  familiar  "Abort,
  2148.     Retry,  Ignore?"   message on the server's screen, and will wait for an
  2149.     answer from the keyboard.  This will hang  the  server  until  a  human
  2150.     comes to the keyboard and gives a response.  The same thing will happen
  2151.     when any program is invoked that interacts with the real console.  DIS-
  2152.     ABLE ALL seems to avoid most unpleasant situations of this kind.
  2153.  
  2154. For  local  network  operation  with NetBios, the SET PORT NET command (with no
  2155. node name) must be issued before the SERVER command.  MS-Kermit then becomes  a
  2156. network-wide  server, and other client Kermits can start a network session with
  2157. it by using the name of the Kermit Server,  which  is  shown  on  the  server's
  2158. screen  when SET PORT NET is given.  The Kermit Server accepts connections from
  2159. other Kermits, but only one at a time. There may be many Kermit Servers  active
  2160. on  the network simultaneously because each has a unique node name.  Operations
  2161. are exactly the same as with serial port usage and the session (equivalent to a
  2162. dialed phone connection) is maintained between the pair until too many timeouts
  2163. occur, or the client Kermit issues a HANGUP command, exits to DOS, or SETs PORT
  2164. NET to another node.  In the latter cases, the server remains available for use
  2165. by other client Kermits.  If a client Kermit issues the BYE or FINISH  command,
  2166. the network server is shut down (unless it was started with FIN disabled).
  2167.  
  2168.  
  2169. The DISABLE and ENABLE Commands
  2170.  
  2171. For  security  purposes,  it may be desirable to leave your PC in Kermit server
  2172. mode so that it can be dialed in to, but with certain functions unavailable  to
  2173. those who dial in.  The DISABLE and ENABLE commands provide this control.
  2174.  
  2175. The DISABLE and ENABLE commands affect the following functions, with the effect
  2176. of DISABLEs noted:
  2177.  
  2178.     CWD     (CD) Changing of directories, disabled entirely.
  2179.     DEL     Deletion of files confined to current directory.
  2180.     DIR     Production of directory listings confined to current directory.
  2181.     FIN     Shutting down the server (applies also to BYE) disabled entirely.
  2182.     GET     Getting files from the server confined to current directory.
  2183.     HOST    Execution of all REMOTE HOST (DOS) commands disabled entirely.
  2184.     SEND    Forces files sent to server into current directory.
  2185.     SPACE   Asking the server for a disk space report, disabled.
  2186.     TYPE    REMOTE TYPE files confined to current directory.
  2187.     ALL     All of the above.
  2188.     TEK     Automatic invocation of Tektronix graphics mode by  host  commands.
  2189.             This function is not related to server mode, and is not included in
  2190.             the ALL term.
  2191.  
  2192. For reasons which should be obvious, the  Kermit  server  does  not  provide  a
  2193. REMOTE ENABLE command!
  2194.  
  2195.  
  2196. The GET Command
  2197.  
  2198. Syntax: GET remote-filespec
  2199.  
  2200. The  GET  command  requests  a  Kermit  server  to  send the file or file group
  2201. specified by remote-filespec.  This command can be used only when Kermit-MS has
  2202. a  Kermit server active on the other end of the connection.  This usually means
  2203. that you have CONNECTed to the other  system,  logged  in,  run  Kermit  there,
  2204. issued  the  SERVER  command,  and  escaped  back  (e.g.  "^]C")  to  the local
  2205. Kermit-MS.  In the case of LAN operation, a Kermit server must be running some-
  2206. where  on  the  network.   If the remote Kermit does not have a SERVER command,
  2207. then you should use SEND and RECEIVE as described above.
  2208.  
  2209. You may use the GET command in a special way to specify a  different  name  for
  2210. storing  the  incoming  file.    Just type GET alone on a line, and you will be
  2211. prompted separately for the remote filespec and the local filespec:
  2212.  
  2213.     Kermit-MS>get
  2214.      Remote Source File: com1 txt
  2215.      Local Destination File: a:xcom1.txt
  2216.  
  2217. The local file name may contain a device field, and/or a  directory  specifica-
  2218. tion.    Device and directory specifications in the local destination file name
  2219. work the same way as in the RECEIVE command.   The  multiline  GET  command  is
  2220. provided  so  that the distinction between the two files is always clear, which
  2221. would not otherwise be the case if the foreign filename had spaces in it.
  2222.  
  2223. The remote filespec is any string that can be a legal  file  specification  for
  2224. the  remote  system;  it  is  not  parsed or validated locally.  It can contain
  2225. whatever wildcard or file-group notation is valid on the remote system, includ-
  2226. ing  spaces.  If  the string needs to begin with a question mark (?) then use a
  2227. sharp sign (#) instead to avoid Kermit's help message; it will  be  transmitted
  2228. as a question mark.
  2229.  
  2230. Once the file transfer begins, the GET command behaves exactly like the RECEIVE
  2231. command.
  2232.  
  2233. Warning:  If the remote filespec is to contain a semicolon, and the GET command
  2234. is  being issued from a TAKE command file, you must prefix the semicolon with a
  2235. backslash.  Otherwise, all characters beginning with the semicolon will be  ig-
  2236. nored:
  2237.  
  2238.     get me.home\;2
  2239.  
  2240.  
  2241. 1.6.8. Commands for Controlling Remote Kermit Servers
  2242.  
  2243. The  BYE,  FINISH,  and  LOGOUT commands allow you to shut down a remote Kermit
  2244. server:
  2245.  
  2246. BYE     When communicating with a remote Kermit server, use the BYE command  to
  2247.         shut  down the server, log out its job, and exit locally from Kermit-MS
  2248.         to DOS.  On local area networks, BYE also terminates the  network  ses-
  2249.         sion.
  2250.  
  2251. FINISH  Like  BYE,  FINISH  shuts down the remote server.  However, FINISH does
  2252.         not log out the server's job.  You are left at Kermit-MS  prompt  level
  2253.         so that you can connect back to the job on the remote system.  On local
  2254.         area nets, FINISH shuts down the MS-Kermit server, but in  a  way  that
  2255.         allows it to be restarted as if no interruption had occurred.
  2256.  
  2257. LOGOUT  The  LOGOUT  command  is  identical to the BYE command, except you will
  2258.         remain at Kermit-MS prompt level, rather than exit to DOS, so that  you
  2259.         can  establish  or  use  another  connection  without having to restart
  2260.         MS-Kermit.
  2261.  
  2262.  
  2263. The REMOTE Commands
  2264.  
  2265. The REMOTE keyword is a prefix for a number of commands.  It indicates that the
  2266. command  is  to be performed by a remote Kermit server.  Not all Kermit servers
  2267. are capable of executing all of these commands, and some Kermit servers may  be
  2268. able to perform functions for which Kermit-MS does not yet have the correspond-
  2269. ing commands.  In case you send a command the server cannot  execute,  it  will
  2270. send  back  a message stating that the command is unknown to it.  If the remote
  2271. server can execute the command, it will send  the  results,  if  any,  to  your
  2272. screen.
  2273.  
  2274. Here are the REMOTE commands that Kermit-MS may issue:
  2275.  
  2276. REMOTE CWD [directory]
  2277.         (Also REMOTE CD) Ask the server to Change your Working Directory on the
  2278.         remote  host, that is, the default source and destination area for file
  2279.         transfer and management.  You will be prompted for  a  password,  which
  2280.         will  not  echo  as you type it.  If you do not supply a password (i.e.
  2281.         you type only a carriage return), the server will attempt to access the
  2282.         specified  directory without a password.  If you do not supply a direc-
  2283.         tory name, your default or login directory on the remote system will be
  2284.         assumed and you will not be prompted for a password.
  2285.  
  2286. REMOTE DELETE filespec
  2287.         Ask the server to delete the specified file or files on the remote sys-
  2288.         tem.  In response, the server may display a list of the files that were
  2289.         or were not successfully deleted.
  2290.  
  2291. REMOTE DIRECTORY [filespec]
  2292.         Ask  the  server to display a directory listing of the specified files.
  2293.         If no files are specified, then the list should include  all  files  in
  2294.         the current working directory.
  2295.  
  2296. REMOTE HELP
  2297.         Ask the server to list the services it provides.
  2298.  
  2299. REMOTE HOST [command]
  2300.         Ask  the  server  to  send  the  command to the remote system's command
  2301.         processor for execution.
  2302.  
  2303. REMOTE KERMIT command
  2304.         Send  the  command  to the remote Kermit for interpretation as a Kermit
  2305.         command in the remote Kermit server's own command syntax.
  2306.  
  2307. REMOTE LOGIN user
  2308.         Password  and  account  are  always  solicted  via prompts.  A carriage
  2309.         return response corresponds to an empty entry.   REMOTE  LOGIN  applies
  2310.         only to a remote Kermit server and not to a remote operating system; an
  2311.         MS Kermit server does not understand the command.
  2312.  
  2313. REMOTE MESSAGE text
  2314.         Send the one line text message to be displayed on the Server's screen.
  2315.  
  2316. REMOTE SPACE [directory]
  2317.         Ask the server to  provide  a  brief  summary  of  disk  usage  in  the
  2318.         specified area on the remote host or, if none specified, the default or
  2319.         current area.
  2320.  
  2321. REMOTE TYPE filespec
  2322.         Ask  the server to display the contents of the specified remote file or
  2323.         files on your screen.
  2324.  
  2325. REMOTE WHO [who-spec]
  2326.         Ask  the  server  to  list  actively logged on users; optional who-spec
  2327.         qualifies the list and uses the syntax of the server system.
  2328.  
  2329.  
  2330. The Mail Command
  2331.  
  2332. Syntax:  MAIL filespec address
  2333.  
  2334. The MAIL command is a very close relative of Kermit's SEND command.  Mail sends
  2335. a  file,  or  file group, to a Kermit server with instructions (in an Attribute
  2336. packet) to submit the file(s) to the host's Mailer utility  rather  than  store
  2337. them  on  disk.   To round out a mail request a field following the filename is
  2338. required, and into it we place the address to which the files are to be mailed.
  2339. Mail  addresses  vary  substantially,  but several common forms are "username",
  2340. "username@host", and "host::username".  The MAIL command will work only if  the
  2341. Kermit  server  understands it, otherwise the mail request will be rejected be-
  2342. fore any files are sent.  Kermit-MS can send mail but it cannot receive it, be-
  2343. cause  MS-DOS  does not have a mail facility.  When sending, there is no way to
  2344. transmit any fields other than the recipient's address and  the  message  body;
  2345. fields like subject and cc are not supported.
  2346.  
  2347.  
  2348. 1.6.9. The LOG and CLOSE Commands
  2349.  
  2350. Syntax: LOG {PACKET, SESSION, TRANSACTION} [filespec]
  2351.         CLOSE {PACKET, SESSION, TRANSACTION}
  2352.  
  2353. The  LOG  command tells MS-Kermit to record the terminal session, file transfer
  2354. transactions, or the file transfer protocol packets themselves in a  log  file.
  2355. If  the  log file already exists then new material is appended to it.  Open log
  2356. files may be closed (and the associated logging disabled) using the CLOSE  com-
  2357. mand.  Open log files are also closed when you EXIT from Kermit.
  2358.  
  2359. LOG  SESSION  is  used  to  record  your terminal emulation typescript.  It was
  2360. described above, in the section on file transfer.
  2361.  
  2362.  
  2363. The LOG TRANSACTION Command
  2364.  
  2365. Syntax: LOG TRANSACTION [filespec]
  2366.  
  2367. The Transaction log is a file recording a pair of text  lines  describing  each
  2368. file transfer (SEND, GET, RECEIVE, or some REMOTE commands). The lines indicate
  2369. the local filename (and remote name if different), the time  and  date  of  the
  2370. start  of  the transfer, the number of bytes transferred, and the status of the
  2371. transfer.  New entries are always appended to old to prevent loss  of  records.
  2372. The  default  filename  is TRANSACT.LOG.  The command SHOW LOGGING displays the
  2373. current names and which logs are active.  The command  CLOSE  TRANSACTION  will
  2374. voluntarily terminate this class of log; otherwise, it will be closed automati-
  2375. cally when Kermit exits.
  2376.  
  2377.  
  2378. The LOG PACKETS Command
  2379.  
  2380. Syntax: LOG PACKETS [filespec]
  2381.  
  2382. The packet log is for diagnostic purposes  and  records  each  Kermit  protocol
  2383. packet  sent  and received in printable format.  Control characters are written
  2384. as caret-letter and characters with the high bit set are shown as  their  7-bit
  2385. part  preceeded  by  a  tilde.  The default filename is PACKET.LOG.  If you ex-
  2386. perience difficulty with file transfers the packet log is valuable in discover-
  2387. ing  who  said what to whom, even though a copy of the Kermit book is needed to
  2388. unravel the meaning of each character in a packet.
  2389. 1.6.10. The SET Command
  2390.  
  2391. Syntax: SET parameter [parameter] value
  2392.  
  2393. The SET command establishes or modifies parameters for file  transfer  or  ter-
  2394. minal  connection.    You can examine their values with the SHOW or STATUS com-
  2395. mands.  The following SET commands are available in Kermit-MS:
  2396.  
  2397.                ALARM  Set alarm clock time, for IF ALARM testing
  2398.           ATTRIBUTES  Controls whether MS-Kermit uses Attribute packets
  2399.                 BAUD  Communications port line speed (synonym for SPEED)
  2400.                 BELL  Whether to beep at the end of a transaction
  2401.     BLOCK-CHECK-TYPE  Level of error checking for file transfer
  2402.                COUNT  Variable for TAKE file and macro IF COUNT testing
  2403.                DEBUG  Display packet contents during file transfer
  2404.         DEFAULT-DISK  Default disk drive for file i/o
  2405.                DELAY  Wait number seconds before Sending a file
  2406.          DESTINATION  Default destination device for incoming files
  2407.              DISPLAY  For selecting the type of file transfer display
  2408.                 DUMP  Screen dump file (or device) name
  2409.          END-OF-LINE  Packet termination character
  2410.                  EOF  Method for determining or marking end of file
  2411.           ERRORLEVEL  Value returned to DOS Batch files
  2412.               ESCAPE  Escape character for CONNECT
  2413.         FLOW-CONTROL  Enable or disable XON/XOFF
  2414.            HANDSHAKE  Half-duplex line turnaround option
  2415.           INCOMPLETE  What to do with an incompletely received file
  2416.                INPUT  Behavior of INPUT command for scripts
  2417.                  KEY  Specify key redefinitions
  2418.           LOCAL-ECHO  Specify which computer does the echoing during CONNECT
  2419.            MODE-LINE  Whether to display a mode line during terminal emulation
  2420.               PARITY  Character parity to use
  2421.                 PORT  Select a communications port
  2422.               PROMPT  Change the "Kermit-MS>" prompt to something else
  2423.              RECEIVE  Request remote Kermit to use specified parameters
  2424.               REMOTE  For running Kermit-MS interactively from back port
  2425.                RETRY  Packet retransmission threshold
  2426.                 SEND  Use the specified parameters during file transfer
  2427.               SERVER  Parameters for server mode (command wait timeout)
  2428.                SPEED  Communications port line speed (synonym for BAUD)
  2429.            TAKE-ECHO  Control echoing of commands from TAKE files
  2430.             TERMINAL  Emulation and parameters
  2431.                TIMER  Enable/disable timeouts during file transfer
  2432.          TRANSLATION  Enable/disable/specify conversion of arriving characters
  2433.              WARNING  Specify how to handle filename collisions
  2434.  
  2435. The SET commands are now described in detail, in alphabetical order.
  2436.  
  2437.  
  2438. SET ALARM
  2439.  
  2440. Syntax: SET ALARM {seconds, hh:mm:ss}
  2441.  
  2442. The alarm is a timer, like an alarm clock, available for testing  by  IF  ALARM
  2443. statements.    The  alarm  time  is  given  as seconds from the present or as a
  2444. 24-hour specific time of day.  Both need to be within 12 hours of  the  present
  2445. to  avoid  being mistaken for times in the past.  SHOW SCRIPT displays the cur-
  2446. rent alarm setting.
  2447.  
  2448.  
  2449. SET ATTRIBUTES
  2450.  
  2451. Syntax: SET ATTRIBUTES {ON, OFF}
  2452.  
  2453. Disables or enables use of Kermit file Attribute protocol packets,  which  con-
  2454. tain  the  size, time, and date of files transferred using the Kermit protocol.
  2455. This command is a safety feature so that a small misunderstanding with  another
  2456. Kermit  cannot  block  transfers.  SHOW FILE tells whether attributes are on or
  2457. off; they are normally ON.
  2458.  
  2459.  
  2460. SET BAUD
  2461.  
  2462. Syntax: SET BAUD number
  2463.  
  2464. Synonym for SET SPEED (q.v.).
  2465.  
  2466.  
  2467. SET BELL
  2468.  
  2469. Syntax: SET BELL {ON, OFF}
  2470.  
  2471. Specifies whether the bell (beeper) should sound  upon  completion  of  a  file
  2472. transfer operation.  Normally ON.
  2473.  
  2474.  
  2475. SET BLOCK-CHECK-TYPE
  2476.  
  2477. Syntax: SET BLOCK-CHECK-TYPE {1, 2, 3}
  2478.  
  2479. Selects  the  error  detection method: a 1-character 6-bit checksum (the normal
  2480. case), a 2-character 12-bit checksum, or a 3-character 16-bit cyclic redundancy
  2481. check  (CRC).  If the other Kermit program is not capable of type 2 or 3 check-
  2482. ing methods, automatic fallback to type 1 will occur.  The more secure  type  2
  2483. and  3  block  checks take essentially no more execution time than the simple 1
  2484. character checksum.  SET BLOCK 3 is a stronger check than SET  BLOCK  2.    SET
  2485. BLOCK  2  or 3 is recommended for use with long packets (see below), noisy com-
  2486. munication lines, binary (8-bit data) files, and text files containing critical
  2487. data (budgets, grades, etc).
  2488.  
  2489.  
  2490. SET COUNT
  2491.  
  2492. Syntax: SET COUNT number
  2493.  
  2494. Set  the value of the script COUNT variable to be between 0 and 65535. COUNT is
  2495. used with IF COUNT to construct counted loops in script TAKE files and  macros.
  2496. Each  active  TAKE  file or macro uses a private version of COUNT.  The default
  2497. value is  zero,  and  the  SHOW  SCRIPT  command  displays  the  current  value
  2498. (meaningful only when given within a TAKE file or macro).
  2499.  
  2500.  
  2501. SET DEBUG
  2502.  
  2503. Syntax: SET DEBUG {PACKET, SESSION, ON, OFF}
  2504.  
  2505. With DEBUG PACKET, Kermit will display the actual packets on your screen during
  2506. file transfer.  With the normal file transfer display,  regular-length  packets
  2507. sent  and  received  are  displayed  in  fixed-size  slots.    The  display  of
  2508. extended-length packets, however (see  SET  RECEIVE  PACKET-LENGTH),  tends  to
  2509. overlap.  If this bothers you, then also SET DISPLAY SERIAL, or LOG the packets
  2510. rather than displaying them.
  2511.  
  2512. With DEBUG SESSION, during terminal emulation (on the IBM PC,  Rainbow,  and  a
  2513. few  others),  control  characters  are displayed in uparrow ("^") notation and
  2514. characters with the 8th bit set are preceded by the tilde ("~") sign, and  your
  2515. session  log (if any) will record 8-bit bytes, rather than 7-bit ASCII, regard-
  2516. less of SET DISPLAY or SET PARITY.    Character  translation  (SET  TRANSLATION
  2517. INPUT)  is  not done during session debugging.  The effect of SET DEBUG SESSION
  2518. during terminal connection can be disconcerting, but it gives you a  convenient
  2519. line  monitor  equivalent  to  a specialized device that costs several thousand
  2520. dollars, and it can prove very  handy  for  tracking  down  data  communication
  2521. problems.
  2522.  
  2523. SET  DEBUG  ON  turns  on  both SESSION and PACKET debugging, and SET DEBUG OFF
  2524. turns them both off.
  2525.  
  2526.  
  2527. SET DEFAULT-DISK
  2528.  
  2529. Syntax: SET DEFAULT-DISK x:[directory]
  2530.  
  2531. Specify the default disk drive to use for file  transfer,  directory  listings,
  2532. and so forth.  Equivalent to typing the DOS command for changing disks (A:, B:,
  2533. etc).  Affects Kermit and all inferior processes, but when you exit  from  Ker-
  2534. mit,  you will still have the same default disk as when you entered.  As a con-
  2535. venience, a directory may be specified with or without the drive to change  one
  2536. or the other or both.  This command is a synonym for CWD (CD).
  2537.  
  2538.  
  2539. SET DELAY
  2540.  
  2541. Syntax: SET DELAY number
  2542.  
  2543. Wait the specified number of seconds before starting a file transfer.  Intended
  2544. for use when the other side needs appreciable time to  become  ready,  such  as
  2545. rearranging  cables,  changing  programs,  etc.,  or  when MS-DOS Kermit is the
  2546. remote Kermit (e.g. after CTTY COM1, SET REMOTE ON).  The number  is  0  to  63
  2547. seconds, normally 0.
  2548.  
  2549.  
  2550. SET DESTINATION
  2551.  
  2552. Syntax: SET DESTINATION {DISK, PRINTER, SCREEN}
  2553.  
  2554. SET  DESTINATION  PRINTER  will cause incoming files to be sent directly to the
  2555. printer; SCREEN will send output normally destined for the disk to the  screen.
  2556. The normal destination is DISK.  SET DESTINATION affects only files transferred
  2557. with SEND, GET, or RECEIVE; it cannot be used to reroute the output from REMOTE
  2558. server commands.
  2559.  
  2560.  
  2561. SET DISPLAY
  2562.  
  2563. Syntax: SET DISPLAY {QUIET, REGULAR, SERIAL, 7-BIT, 8-BIT}
  2564.  
  2565. During  file  transfer,  MS-DOS  Kermit's regular display is a formatted screen
  2566. whose fields are randomly  updated  with  file  names,  packet  numbers,  error
  2567. counts, percent done, error messages, and so forth, as shown in Figure 1-1.
  2568.  
  2569. If  you wish to run Kermit-MS interactively through the back port, for instance
  2570. after the operator has done CTTY COM1, you must give the command SET REMOTE  ON
  2571. (which,  currently  at  least,  is  equivalent to SET DISPLAY QUIET); this sup-
  2572. presses the file transfer display screen, so that the display  won't  interfere
  2573. with  the  file transfer itself.  You can also use this command to suppress the
  2574. display in local mode, in case you are using a system that  allows  you  to  do
  2575. other work while file transfer proceeds in the background.
  2576.  
  2577. If  you  have  your  PC  connected  to a speaking device (a common practice for
  2578. visually impaired people), or you are logging the display screen to  a  printer
  2579. (using  DOS  ^P or kermit > prn), the random nature of the regular display will
  2580. make the results of little use.  SET DISPLAY SERIAL is provided for  this  pur-
  2581. pose;  it  causes  the program to report progress "serially" on the screen.  In
  2582. serial mode, error messages are preceeded with the word "Error" and repeat mes-
  2583. sages with the word "Retry".  Packets are numbered as dots with every tenth be-
  2584. ing a plus sign.  The packet display is automatically broken  across  lines  at
  2585. every  70th  packet.  The serial display makes much more sense when spoken than
  2586. does the regular display.
  2587.  
  2588. The serial display does not show the percent and kilobytes transferred.  It  is
  2589. the default display style for generic MS-DOS Kermit; REGULAR is the default for
  2590. all others.
  2591.  
  2592. The last two parameters, 7-BIT and 8-BIT, control the size of  characters  sent
  2593. to the screen during terminal emulation.  7-BIT is the default and includes all
  2594. ASCII characters.  8-BIT is useful with national and line drawing characters.
  2595.  
  2596.  
  2597. SET DUMP
  2598.  
  2599. Syntax: SET DUMP filespec
  2600.  
  2601. On those systems that support this feature, change the file or device  name  of
  2602. the  screen dump file.  The normal file name is KERMIT.SCN.  See the section on
  2603. terminal emulation for details about screen dumps.  If the specified  file  al-
  2604. ready  exists then new material is appended to old.  If you want to start a new
  2605. screen dump file, delete the old one first.
  2606.  
  2607.  
  2608. SET END-OF-LINE
  2609.  
  2610. Syntax: SET END-OF-LINE number
  2611.  
  2612. If the remote system needs packets to be terminated by anything other than car-
  2613. riage  return, specify the decimal value, 0-31, of the desired ASCII character.
  2614. Equivalent to SET SEND END-OF-LINE (SET END-OF-LINE is kept only for historical
  2615. reasons, and the parameter really should be called END-OF-PACKET anyway.)
  2616.  
  2617.  
  2618. SET EOF
  2619.  
  2620. Syntax: SET EOF {CTRL-Z, NOCTRL-Z}
  2621.  
  2622. Controls  how the end of file is handled.  CTRL-Z specifies a Control-Z charac-
  2623. ter should be appended to the end of an incoming file.    Certain  MS-DOS  text
  2624. editors  and  other  applications require files to be in this format.  For out-
  2625. bound files, treat the first Control-Z as the end of the local file, and do not
  2626. send  it or any subsequent characters.  NOCTRL-Z is the default; incoming files
  2627. are stored, and MS-DOS files are sent, exactly as is, in their entirety.    Use
  2628. SHOW FILE to see the current SET EOF status.
  2629.  
  2630.  
  2631. SET ERRORLEVEL
  2632.  
  2633. Syntax: SET ERRORLEVEL number
  2634.  
  2635. Forces the DOS "errorlevel" variable to a given value.  This is used in scripts
  2636. when other controls or tests determine that the cumulative errorlevel  reported
  2637. to  DOS  Batch  when Kermit exits needs to be modified.  The number can be 0 to
  2638. 255 decimal.
  2639.  
  2640.  
  2641. SET ESCAPE
  2642.  
  2643. Syntax: SET ESCAPE character
  2644.  
  2645. Specify the control character you want to use to "escape" from  remote  connec-
  2646. tions  back  to  Kermit-MS.    On  most  systems  the default is "^]" (Control-
  2647. Rightbracket), which was chosen because it is a character you  would  otherwise
  2648. rarely type.
  2649.  
  2650. The character is entered literally after SET ESCAPE or in backslash number form
  2651. (\29), and should be chosen from the ASCII control range.  It is  not  possible
  2652. to  use non-ASCII characters (like function keys) for this purpose (but see SET
  2653. KEY for a way around this restriction).
  2654.  
  2655.  
  2656. SET FLOW-CONTROL
  2657.  
  2658. Syntax: SET FLOW-CONTROL {XON/XOFF, NONE}
  2659.  
  2660. Specify the full duplex flow control to be done on the currently selected port.
  2661. The  options are XON/XOFF and NONE.  The specified type of flow control will be
  2662. done during both terminal emulation and file transfer.   By  default,  XON/XOFF
  2663. flow  control  is  selected.  XON/XOFF should not be used on half-duplex (local
  2664. echo) connections, or when the other system does not support it.   If  XON/XOFF
  2665. is used, HANDSHAKE should be set to NONE.
  2666.  
  2667.  
  2668. SET HANDSHAKE
  2669.  
  2670. Syntax: SET HANDSHAKE {CODE number, BELL, CR, LF, NONE, XOFF, XON}
  2671.  
  2672. Specify  any  half-duplex line turnaround handshake character to be used during
  2673. file transfer on the currently selected port.  The CODE number form allows  any
  2674. ASCII  character  to be specified by its decimal ASCII code.  Handshake is NONE
  2675. by default; if set to other than NONE, then FLOW-CONTROL should be set to NONE.
  2676. In  operation  the  handshake  character  is sought at the end of each received
  2677. packet, following the normal END-OF-LINE character, but is not  sent  for  out-
  2678. going packets.
  2679.  
  2680.  
  2681. SET INCOMPLETE
  2682.  
  2683. Syntax: SET INCOMPLETE {DISCARD, KEEP}
  2684.  
  2685. Specifies  what to do with files that arrive incompletely: discard them or keep
  2686. them.  They are normally discarded.
  2687.  
  2688.  
  2689. SET INPUT
  2690.  
  2691. Syntax: SET INPUT {CASE, DEFAULT-TIMEOUT, ECHO, TIMEOUT-ACTION}
  2692.  
  2693. This command is described in Section 1.8, SCRIPTS.
  2694.  
  2695.  
  2696. SET KEY
  2697.  
  2698. Syntax: SET KEY key-specifier [key-definition]
  2699.   Also: SET KEY {ON, OFF, CLEAR}
  2700.  
  2701.     WARNING: The format and functions of this command have changed substan-
  2702.     tially since version 2.29B and earlier.  The changes were made in order
  2703.     to allow key redefinition to work on a wider  variety  of  systems  and
  2704.     keyboards  without  customization  of  the program source code for each
  2705.     configuration.  See section 1.12 for further details.
  2706.  
  2707. Typical uses of SET KEY:
  2708.  
  2709.    - You're used to having the ESC key in the upper  left  corner  of  the
  2710.      keyboard,  but  your new PC keyboard has an accent grave ("`") there.
  2711.      You can use SET KEY to make the accent key transmit an ESC,  and  you
  2712.      can assign accent grave to some other key.
  2713.  
  2714.    - You  send  a lot of electronic mail, and always sign it the same way.
  2715.      You can put your "signature" on a single key to save yourself  a  lot
  2716.      of repetitive typing.
  2717.  
  2718.    - You  must  set  up  your PC's function keys or numeric keypad to work
  2719.      properly with a host application.
  2720.  
  2721.    - You have trouble with Kermit's  2-character  escape  sequences  (like
  2722.      Ctrl-]  C),  and  you  want to assign these functions to single keys,
  2723.      like F10.
  2724.  
  2725. The SET KEY command does these things and more, and SHOW KEY  gives  us  assis-
  2726. tance.  A key can be defined to:
  2727.  
  2728.    - send a single character other than what it would normally send,
  2729.    - send a string of multiple characters,
  2730.    - invoke a CONNECT-mode Kermit action verb,
  2731.    - send itself again.
  2732.  
  2733. SET KEY specifies that when the designated key is struck during terminal emula-
  2734. tion, the specified character or string is sent or the specified Kermit  action
  2735. verb  is  performed.    Key  definitions  operate  only  during CONNECT, not at
  2736. Kermit-MS> or DOS command level.
  2737.  
  2738. The key-specifier is the identification of the key expressed in  system-depend-
  2739. ent  terms.   This can be a letter, such as Q for the key which produces an up-
  2740. percase Q, or the numeric ASCII value of the letter in backslash notation (e.g.
  2741. "\81"),  or  else the numerical "scan code" observed by the system when the key
  2742. is pressed (e.g. "\3856" for Ctrl-Alt-Shift-Q on an IBM PC).  Material  printed
  2743. on  keycaps  is  not  necessarily  a guide to what the key-specifier should be.
  2744. When the word CLEAR is used in place of a key-specifier,  all  key  definitions
  2745. are cleared and then any built-in definitions are restored.
  2746.  
  2747. A string definition is one or more characters, including 8-bit values expressed
  2748. in backslash form, such as
  2749.  
  2750.     SET KEY \315 directory\13     IBM F1 key sends "directory<cr>"
  2751.     SET KEY S X                   S key sends upper case X (a mean trick)
  2752.     SET KEY T \27[m               T key sends three bytes: ESC [ m
  2753.     SET KEY \2336 {del }xxx       Alt-D sends "del "
  2754.     SET KEY \324 \Kexit           F10 escapes back to Kermit-MS> prompt.
  2755.  
  2756. The string begins with the first non-spacing character following the key  iden-
  2757. tification  and  continues  until  the  end  of line, exclusive of any trailing
  2758. spaces.  If a semicolon comment is used and the definition is given in  a  TAKE
  2759. file,  the  line  ends  at the last non-spacing character before the semicolon.
  2760. Curly braces, {...}, can be use to delimit the string  in  case  you  want  the
  2761. definition  to  include trailing spaces.  All text after the closing bracket is
  2762. ignored.
  2763.  
  2764. This manual does not contain a list of all the scan codes for all the  keys  on
  2765. all  the  keyboards  on  all  the PCs supported by MS-Kermit -- that would be a
  2766. manual in itself.  Rather, in order to obtain the key-specifier for the SET KEY
  2767. command, you must type a SHOW KEY command and then press the desired key or key
  2768. combination.  This will report a  scan  code  that  you  can  use  as  the  key
  2769. specifier  in  a  SET  KEY  command.    To do this for many keys is a laborious
  2770. process, so you should collect all your SET KEY commands into a file, which you
  2771. can TAKE, or put them in your MSKERMIT.INI file.
  2772.  
  2773. If  you enter SET KEY by itself, with no key specifier, the command will prompt
  2774. you to press the selected key and again for the  definition  string.    Certain
  2775. characters,  like ESC and CR, may not be entered literally into the string, but
  2776. can be included by inserting escape codes of the form \nnn,  a  backslash  fol-
  2777. lowed by a 1- to 4-digit number corresponding to the ASCII value of the desired
  2778. character.  Where an ASCII digit follows directly  after  a  backslash  number,
  2779. confusion can be avoided by placing curly braces {} around the backslashed num-
  2780. ber; thus, \{27}5 represents the two ASCII characters ESC and 5.
  2781.  
  2782. Here is an example of the use of SET KEY to assign ESC (ASCII 27) to the accent
  2783. grave key.  First the user gets the key-specifier for the key:
  2784.  
  2785.     Kermit-MS>show key
  2786.       Push key to be shown (? shows all): `
  2787.       ASCII char: ` \96 decimal is defined as
  2788.       Self, no translation.
  2789.     Free space: 129 key and 100 string definitions, 837 string characters.
  2790.  
  2791. The  free  space report says that 129 more keys may be redefined, and up to 100
  2792. of them may have multi-character strings assigned to them (as opposed to single
  2793. characters),  and  that  there  are 837 bytes left for these strings, in total.
  2794. Confident that there is enough space left for a new key  definition,  the  user
  2795. proceeds:
  2796.  
  2797.     Kermit-MS>set key
  2798.       Push key to be defined: `
  2799.       Enter new definition: \27
  2800.  
  2801. Once  a key definition is constructed and tested, it may be entered on a single
  2802. line in a command file (such as MSKERMIT.INI):
  2803.  
  2804.     set key \96 \27
  2805.  
  2806. To prevent accidents, SET KEY shows the current definition before asking for  a
  2807. new one; enter a Control-C to keep the current definition, or a carriage return
  2808. to undefine the key, or a query mark (?) to see available choices.
  2809.  
  2810. The keyboard can be restored to its startup state, that  is  all  redefinitions
  2811. removed  and  all  built-in  defitions  restored, by using the keyword CLEAR in
  2812. place of the key identification:
  2813.  
  2814.     SET KEY CLEAR
  2815.  
  2816. Undefined keys which do not send ASCII characters are trapped by  the  keyboard
  2817. translator  and  are rejected; a beep results from using an undefined non-ASCII
  2818. key.
  2819.  
  2820. SET KEY OFF directs MS-Kermit to read keycodes from DOS, rather than  BIOS,  so
  2821. that  console  drivers  like ANSI.SYS that operate at the DOS level may be used
  2822. during Kermit CONNECT sessions.  This would also apply to any special  keyboard
  2823. replacements that come with DOS-level drivers.  SET KEY ON turns key definition
  2824. back on, and returns Kermit to processing keystrokes at the BIOS level.
  2825.  
  2826.  
  2827. Kermit Action Verbs
  2828.  
  2829. An action verb is the shorthand expression for a named Kermit  procedure,  such
  2830. as  "generate  the  proper  sequence  for a left arrow," "show status," "send a
  2831. BREAK," and others; verbs are complex actions and each verb has a name.   In  a
  2832. key  definition  the  verb name is preceeded by backslash K (\K) to avoid being
  2833. confused with a string.  Verbs and strings cannot be used together on a key.
  2834.  
  2835.     SET KEY \331 \Klfarr
  2836.     SET KEY \2349 \Kexit
  2837.  
  2838. makes the IBM keyboard left arrow key execute the verb named lfarr which  sends
  2839. the  proper escape sequence for a VT102 left arrow key (which changes depending
  2840. on the internal state of the VT102).  The leading \K identifies the  definition
  2841. as a Kermit verb, so no string can start as \K or as \{K in upper or lower case
  2842. (use \92K).  The second example has Alt-X invoking the Leave-Connect-Mode  verb
  2843. "exit" (same as Kermit escape character "^]" followed by C).
  2844.  
  2845. Each  system  has  its  own list of verbs and predefined keys.  Table 1-6 shows
  2846. those available for the IBM PC family (there are also some additional verbs for
  2847. reassigning  Heath  or  VT100  function keys, see section 1.17.2).  The SET KEY
  2848. command shows the list of available verbs when a query mark (?) is given  as  a
  2849. definition.    SHOW  KEY  displays  all  currently defined keys or individually
  2850. selected ones; SHOW KEY can be executed only interactively.
  2851.  
  2852. -------------------------------------------------------------------------------
  2853.  
  2854.  
  2855.   Verb           Meaning
  2856.   \Kupscn        Roll up (back) to previous screen
  2857.   \Kdnscn        Roll down (forward) to next screen
  2858.   \Khomscn       Roll up to top of screen memory
  2859.   \Kendscn       Roll down to end of screen memory (current position)
  2860.   \Kupone        Roll screen up one line
  2861.   \Kdnone        Roll screen down one line
  2862.   \Kprtscn       Print the current screen
  2863.   \Kdump         Append the current screen to dump file
  2864.   \Kholdscrn     Toggle hold screen mode
  2865.   \Klogoff       Turn off session logging
  2866.   \Klogon        Turn on session logging
  2867.   \Ktermtype     Toggle terminal type
  2868.   \Kreset        Reset terminal emulator to initial state
  2869.   \Kmodeline     Toggle modeline off/on
  2870.   \Kbreak        Send a BREAK signal
  2871.   \Klbreak       Send a "long BREAK" signal
  2872.   \Khangup       Drop DTR so modem will hang up phone
  2873.   \Knull         Send a null (ASCII 0)
  2874.   \Kdos          "Push" to DOS
  2875.   \Khelp         Display CONNECT help message
  2876.   \Kstatus       Display STATUS message
  2877.   \Kterminals    Invoke user-defined macro TERMINALS, if any
  2878.   \Kterminalr    Invoke user-defined macro TERMINALR, if any
  2879.   \Kexit         Escape back from CONNECT mode
  2880.   \Kgold,\Kpf1   VT102 keypad function key PF1
  2881.   \Kpf2..\Kpf4   VT102 keypad function keys
  2882.   \Kkp0..\Kkp9   VT102 keypad numeric keys
  2883.   \Kkpdot,\Kkpminus,\Kkpcoma,\Kkpenter   Other VT102 keypad keys
  2884.   \Kuparr,\Kdnarr,\Klfarr,\Krtarr   VT102 cursor (arrow) keys
  2885.  
  2886.                Table 1-6:  Kermit-MS Verbs for the IBM PC Family
  2887.  
  2888. -------------------------------------------------------------------------------
  2889.  
  2890. Some systems have preset key definitions when Kermit first  begins  (those  for
  2891. the  IBM  PC  are  shown in section 1.17.2).  You can find out what they are on
  2892. your system by typing SHOW KEY, and then question mark on the next line.    You
  2893. may supplement or change the predefined keys with SET KEY commands typed inter-
  2894. actively or in MSKERMIT.INI or other command files.
  2895.  
  2896. The MS-Kermit CONNECT command may be used in conjunction with  certain  console
  2897. drivers  that  do  their  own  key  redefinitions.   Since MS-Kermit intercepts
  2898. keystrokes at the BIOS level, drivers like ANSI.SYS which work at the DOS level
  2899. will  have no effect during CONNECT, even though they work at MS-Kermit command
  2900. level.  Other drivers, like SuperKey and ProKey, work at the  BIOS  level,  and
  2901. their  key  assignments  will remain effective during Kermit terminal sessions,
  2902. and additional Kermit SET KEY assignments may be made "on top" of them.
  2903.  
  2904.  
  2905. SET LOCAL-ECHO
  2906.  
  2907. Syntax: SET LOCAL-ECHO {ON, OFF}
  2908.  
  2909. Specify how characters are echoed during terminal emulation  on  the  currently
  2910. selected  port.    ON  specifies  that characters are to be echoed by Kermit-MS
  2911. (because neither the remote computer nor the communications circuitry has  been
  2912. requested to echo), and is appropriate for half-duplex connections.  LOCAL-ECHO
  2913. is OFF by default, for full-duplex, remote echo operation.
  2914.  
  2915.  
  2916. SET MODE-LINE
  2917.  
  2918. Syntax: SET MODE-LINE {ON, OFF}
  2919.  
  2920. On systems, like the IBM PC family, which are capable of displaying  a  status,
  2921. or "mode" line on the 25th (or bottom) line during terminal connection, disable
  2922. or enable this function.  This command has no effect on  systems  that  do  not
  2923. display a mode line during connect.
  2924.  
  2925. The  mode  line  shows several important facts about the connection, like which
  2926. port is being used, the transmission  speed  and  parity,  the  current  escape
  2927. character,  etc.    When  the mode line is enabled, it may be turned on and off
  2928. using the CONNECT escape-level command M or the Kermit verb "modeline".
  2929.  
  2930. The mode line occupies the 25th line of those systems that have such  a  thing,
  2931. and  is not affected by scrolling (on some systems that have large screens, the
  2932. mode line should appear on whatever the bottom line is, e.g. the 43rd).    When
  2933. emulating  a  VT102 or Heath-19, Kermit will allow the host to address the 25th
  2934. line directly using cursor positioning commands.  If this happens, Kermit  will
  2935. remove its mode line and relinquish control of the 25th line to the host (as if
  2936. you had typed SET MODE OFF).  When the Tektronix, or no terminal at all, is be-
  2937. ing  emulated,  the 25th line (if any) is available for scrolling.  If the mode
  2938. line is disabled by an application or by the command SET MODE OFF then the only
  2939. way to revive Kermit's mode line display is to give the command SET MODE ON.
  2940.  
  2941.  
  2942. SET PARITY
  2943.  
  2944. Syntax: SET PARITY {EVEN, ODD, MARK, SPACE, NONE}
  2945.  
  2946. Specify  the  character  parity to be used on the currently selected port.  You
  2947. will need to SET PARITY to ODD, EVEN, MARK, or possibly SPACE when  communicat-
  2948. ing  with  a  system, or over a network, or through modems, concentrators, mul-
  2949. tiplexers, or front ends that require or impose character parity  on  the  com-
  2950. munication  line.   For instance, most IBM mainframe computers use EVEN or MARK
  2951. parity; Telenet normally uses MARK parity.  If you neglect to SET  PARITY  when
  2952. the  communications  equipment  requires  it,  the symptom may be that terminal
  2953. emulation works (well or maybe only partially), but file transfer or script IN-
  2954. PUT commands do not work at all.
  2955.  
  2956. NONE means that no parity processing is done, and the 8th bit of each character
  2957. can be used for data when transmitting binary files.  This is the normal  case.
  2958. If  parity  is  other  than none, then there will be 7 data bits (use of parity
  2959. with 8 data bits is not supported).
  2960.  
  2961. If you have set parity to ODD, EVEN, MARK, or SPACE, then  Kermit-MS  will  re-
  2962. quest  that  binary files be transferred using 8th-bit-prefixing.  If the other
  2963. Kermit knows how to do 8th-bit-prefixing (this is an optional  feature  of  the
  2964. Kermit  protocol, and some implementations of Kermit don't have it), then 8-bit
  2965. binary files can be transmitted successfully.  If NONE is  specified,  8th-bit-
  2966. prefixing  will  not  be  requested.   Note that there is no advantage to using
  2967. parity.  It reduces Kermit's file transfer  efficiency  without  providing  ad-
  2968. ditional  error  detection.    The SET PARITY command is provided only to allow
  2969. Kermit to adapt to conditions where parity is required, or  8-bit  transmission
  2970. is otherwise thwarted.
  2971.  
  2972. If parity is in use, then the display during terminal emulation, as well as any
  2973. session log, will be 7-bit ASCII, unless you have SET DEBUG ON (q.v.).
  2974.  
  2975. There may be situations in which you require 7-bit ASCII with no parity  during
  2976. terminal  emulation,  but  still  want  to  force 8th bit prefixing during file
  2977. transfer.  To accomplish this, SET PARITY SPACE.
  2978.  
  2979. The INPUT and TRANSMIT commands use 7 or 8 bits if parity is NONE, according to
  2980. the  SET DISPLAY command, and this may upset recognition of received characters
  2981. when the host unexpectedly sends them with its own parity.
  2982.  
  2983. WARNING: The SET PARITY command has no effect on  a  port  used  for  printing.
  2984. This  is  because  printing  is  done  by DOS, not Kermit.  Since Kermit clears
  2985. hardware parity on COM1 at startup, it is not recommended that COM1 be used for
  2986. a serial printer, unless the printer works with no parity.
  2987. SET PORT
  2988.  
  2989. Syntax: SET PORT {number, COMn, BIOSn, NET [nodename], UB-NET1 [nodename]}
  2990.  
  2991. On  machines with more than one communications port, select the port to use for
  2992. file transfer and CONNECT.  This command lets you use a different  asynchronous
  2993. adapter,  or  switch  between  two  or more simultaneous remote sessions.  Sub-
  2994. sequent SET SPEED, PARITY, HANDSHAKE, FLOW, and LOCAL-ECHO commands will  apply
  2995. to  this  port  only -- each port remembers its own parameters, so that you may
  2996. set them for each port and then switch between ports conveniently with the  SET
  2997. PORT command.
  2998.  
  2999. SET PORT 1 selects COM1, SET PORT 2 selects COM2.  All versions default to port
  3000. 1, except for the IBM PCjr, which uses port 2 if  its  internal  modem  is  in-
  3001. stalled.  Additionally, COM3 and COM4 are supported for IBM PC/AT's and PS/2's,
  3002. as explained in Section 1.18.3.
  3003.  
  3004. SET PORT BIOSn, on machines which support it, instructs  Kermit  to  do  serial
  3005. port  input and output by Bios calls rather than going directly to the hardware
  3006. (n is a digit between 1 and 4).  The most important use  is  allowing  selected
  3007. network  packages  to intercept such Bios calls and relay the characters across
  3008. the network.
  3009.  
  3010. In "generic" MS-DOS Kermit, the following alternate forms allow you to  experi-
  3011. ment with device names or numbers until you find the communication port:
  3012.  
  3013.     SET PORT {DEVICE, FILE-HANDLE}
  3014.  
  3015. Just  type  a  carriage  return after either of these commands, and you will be
  3016. prompted for a device name or a numeric port-handle.  Keep trying till you find
  3017. one  that works. File-handle 3, the system auxillary device, is conventional on
  3018. many machines, as are device names COM1, COM2, and AUX.
  3019.  
  3020. MS-Kermit for the IBM PC family is able to operate  over  local  area  networks
  3021. through the NetBIOS interface.  The command
  3022.  
  3023.     SET PORT NET [nodename]
  3024.  
  3025. redirects  communications the LAN board installed in the local computer and the
  3026. associated NetBIOS emulator software, if active, rather than the serial port or
  3027. the COM device driver.  It installs a unique Kermit node name in the local LAN,
  3028. so that other nodes can refer to it when  files  are  transferred  or  terminal
  3029. emulation  is done.  This name is displayed when you give the SET PORT NET com-
  3030. mand.  The server should use SET PORT NET, and the client should use  SET  PORT
  3031. NET  nodename,   specifying  the server's name, e.g. mskermit.K.  Note that al-
  3032. phabetic case is significant in node names!
  3033.  
  3034. Both the regular serial port and a network connection can be kept alive  simul-
  3035. taneously; clearly, only one can be used at a time under MS-DOS.  MS-DOS 3.x is
  3036. not required for Kermit network usage, but most LANS do need DOS 3.1  or  later
  3037. for conventional file server work.  Kermit needs only the NetBIOS emulator net-
  3038. work software.
  3039.  
  3040. SET PORT UB-NET1 is implemented on the IBM PC version of Kermit to  allow  con-
  3041. nection  to Ungermann-Bass Net One LAN NETCI interface and behaves similarly to
  3042. the NetBIOS method.
  3043.  
  3044.  
  3045. SET PROMPT
  3046.  
  3047. Syntax: SET PROMPT [string]
  3048.  
  3049. This command allows you to change the MS-DOS  Kermit  program's  prompt.    The
  3050. string may be enclosed in curly braces.  Control characters like ESC can be in-
  3051. cluded as backslashed numbers like "\27".  ANSI.SYS and similar console drivers
  3052. can  be  programmed  through  this  command  to get a boldface, inverse, and/or
  3053. blinking prompt.  The prompt string must be less than 128 characters.   If  the
  3054. string  is  omitted  (missing) Kermit's original prompt of "Kermit-MS>" is res-
  3055. tored.
  3056.  
  3057.  
  3058. SET RECEIVE
  3059.  
  3060. Syntax: SET RECEIVE parameter value
  3061.  
  3062. This command lets you modify the ways in which MS-Kermit asks the other  Kermit
  3063. to behave.  That is, it controls the file transfer protocol options for packets
  3064. sent to MS-Kermit by the other Kermit.  The parameters and values  you  specify
  3065. in the SET RECEIVE command are sent to the other Kermit during initial negotia-
  3066. tions.  Numbers may be specified as ordinary decimal numbers (74), or in  back-
  3067. slash notation (\x03F).
  3068.  
  3069. END-OF-LINE number
  3070.         The ASCII value of terminating character to look for on incoming  pack-
  3071.         ets.    Normally carriage return.  Use this command if the other Kermit
  3072.         is terminating its packets with some other control character.
  3073.  
  3074. PACKET-LENGTH number
  3075.         Ask  the  remote Kermit to use the specified maximum length for packets
  3076.         that it sends to Kermit-MS.  The normal length is 94 bytes.   Use  this
  3077.         command  to  shorten packets if the communication line is noisy or ter-
  3078.         minal buffers somewhere along the path are too small.  Shorter  packets
  3079.         decrease  the  probability  that a particular packet will be corrupted,
  3080.         and will reduce the retransmission overhead when corruption occurs, but
  3081.         will increase the file transfer throughput.
  3082.  
  3083.         If  a  length  greater  than  94 is specified, a protocol option called
  3084.         "long packets" will be used, provided the other  Kermit  also  supports
  3085.         it.    Kermit-MS  can  receive extended-length packets up to 1000 bytes
  3086.         long.  Long Packets can improve efficiency by reducing  the  per-packet
  3087.         overhead  for  a  file, but they will not be used unless you issue this
  3088.         command.  Before using this option, ensure that the  equipment  on  the
  3089.         communications  pathway  can absorb a long packet, and that the connec-
  3090.         tion is clean (retransmission of long  packets  is  expensive!).    You
  3091.         should also SET BLOCK-CHECK 2 or 3 for more reliable error checking.
  3092.  
  3093. PADCHAR number
  3094.         Ask the remote Kermit to use the given control character (expressed  as
  3095.         a  decimal  number  0-31,  or  127) for interpacket padding.  Kermit-MS
  3096.         should never require any padding.
  3097.  
  3098. PADDING number
  3099.         Ask  the remote Kermit to insert the given number of padding characters
  3100.         before each packet it sends.  MS-Kermit never needs padding,  but  this
  3101.         mechanism  might  be  required  to  keep some intervening communication
  3102.         equipment happy.
  3103.  
  3104. START-OF-PACKET number
  3105.         If  the  remote  Kermit will be marking the beginning of packets with a
  3106.         control character other  than  Control-A,  use  this  command  to  tell
  3107.         Kermit-MS  about  it (the number should be the decimal ASCII value of a
  3108.         control character).  This will be necessary only if the hosts  or  com-
  3109.         munication  equipment involved cannot pass a Control-A through as data,
  3110.         or if some piece of communication equipment is echoing packets back  at
  3111.         you.
  3112.  
  3113. TIMEOUT number
  3114.         Ask the remote Kermit to time out and retransmit after the given number
  3115.         of  seconds  if  a packet expected from Kermit-MS has not arrived.  Use
  3116.         this command to change the other Kermit's normal timeout interval.
  3117.  
  3118.  
  3119. SET REMOTE
  3120.  
  3121. Syntax: SET REMOTE {ON, OFF}
  3122.  
  3123. SET REMOTE ON removes the file transfer display (as if you had given  the  com-
  3124. mand  SET  DISPLAY QUIET).  It should be used when you are running Kermit-MS in
  3125. remote mode when coming in from another PC through the Kermit-MS's "back port",
  3126. to which the console has been reassigned using the DOS CTTY command, e.g.
  3127.  
  3128.     CTTY COM1
  3129.  
  3130. It is necessary to issue the SET REMOTE ON command because (a) Kermit-MS has no
  3131. way of knowing that its console has been redirected, and (b) when  the  console
  3132. is the same as the port, the file transfer display will interfere with the file
  3133. transfer itself.  SET REMOTE OFF returns  the  file  transfer  display  to  its
  3134. preferred  style  (REGULAR  or SERIAL).  When you SET REMOTE ON, you might also
  3135. want to SET DELAY 5 or thereabouts, to allow yourself time to  escape  back  to
  3136. the local system before MS-Kermit starts sending packets.
  3137.  
  3138. On  the  IBM  PC,  CTTY  CON  returns control to the normal keyboard and screen
  3139. (other systems may use other device names, e.g. SCRN).  See section 1.18.4  for
  3140. further details about remote operation.
  3141.  
  3142. If  you are using a port other than COM1 on the remote MS-Kermit, you must give
  3143. it an appropriate SET PORT command.
  3144.  
  3145. WARNING: During CTTY console redirection, many programs  still  output  to  the
  3146. real  screen  and require input from the real keyboard and will hang the system
  3147. until keyboard requests are satisfied.
  3148.  
  3149.  
  3150. SET RETRY
  3151.  
  3152. Syntax: SET RETRY number
  3153.  
  3154. Sets the number of times a packet is retransmitted before  the  protocol  gives
  3155. up.   The number of retries can be between 1 and 63, and is 5 by default.  This
  3156. is an especially useful parameter when the communications line is noisy or  the
  3157. remote host is very busy.  The initial packet of a file exchange is given three
  3158. times as many retries to allow both systems to become ready.
  3159.  
  3160.  
  3161. SET SEND
  3162.  
  3163. Syntax: SET SEND parameter value
  3164.  
  3165. The SET SEND command is used primarily to override negotiated protocol options,
  3166. or to establish them before they are negotiated.
  3167.  
  3168. END-OF-LINE number
  3169.         ASCII value of packet terminator to put on outbound packets.   Normally
  3170.         carriage  return.  Use this command if the other Kermit needs its pack-
  3171.         ets terminated with a nonstandard control character.
  3172.  
  3173. PACKET-LENGTH number
  3174.         Use this as the maximum length for outbound packets, regardless of what
  3175.         the other Kermit asks for.  Normally, you would use this  command  only
  3176.         to  send  shorter  packets  than the other Kermit requests, because you
  3177.         know something the other Kermit doesn't know, e.g.  there's a device on
  3178.         the communication path with small buffers.
  3179.  
  3180. PADCHAR number
  3181.         Use the specified control character  for  interpacket  padding.    Some
  3182.         hosts  may require some padding characters (normally NUL or DEL) before
  3183.         a packet, and certain front ends or other communication  equipment  may
  3184.         need  certain  control  characters to put them in the right modes.  The
  3185.         number is the ASCII decimal value of the padding character, (0 - 31, or
  3186.         127).
  3187.  
  3188. PADDING number
  3189.         How many copies of the pad character to send before each  packet,  nor-
  3190.         mally zero.
  3191.  
  3192. PAUSE number
  3193.         How many milliseconds to pause before sending each packet, 0-127,  nor-
  3194.         mally  zero.    This  may  help half-duplex or slow systems prepare for
  3195.         reception of our packet.  Padding characters are sent  only  after  the
  3196.         time limit expires.
  3197.  
  3198. QUOTE number
  3199.         Use the indicated printable character for prefixing  (quoting)  control
  3200.         characters and other prefix characters.  The only reason to change this
  3201.         would be for sending a very long  file  that  contains  very  many  "#"
  3202.         characters (the normal control prefix) as data.
  3203.  
  3204. START-OF-PACKET number
  3205.         Mark the beginning of outbound  packets  with  some  control  character
  3206.         other than Control-A.  This will be necessary if the remote host or the
  3207.         communication channel cannot accept a  Control-A  as  data,  or  if  it
  3208.         echoes  back  your  packets.   The remote host must have been given the
  3209.         corresponding SET RECEIVE START-OF-PACKET command.
  3210.  
  3211. TIMEOUT number
  3212.         Change  Kermit-MS's  normal timeout interval; this command is effective
  3213.         only if TIMER is set to be ON; it is normally ON, with a default inter-
  3214.         val of 13 seconds.
  3215.  
  3216.  
  3217. SET SERVER
  3218.  
  3219. Syntax: SET SERVER TIMEOUT seconds
  3220.  
  3221. Specify  how often the MS-DOS Kermit server should send NAK packets while wait-
  3222. ing for commands.  These NAK packets are used to recover  from  deadlocks  that
  3223. might  occur  when  the other Kermit sends an initial packet which is lost, but
  3224. does not have the capability to time out and retransmit it.  These NAKs can  be
  3225. supressed  entirely  by  specifying  a value of zero.  This may be necessary to
  3226. avoid interfering with certain modems or PBXs that go into originate mode  when
  3227. they  receive  input  from  the  PC,  when in fact you want the device to be in
  3228. answer mode.
  3229.  
  3230.  
  3231. SET SPEED
  3232.  
  3233. Syntax: SET SPEED rate
  3234.  
  3235. Set the transmission speed (in bits per second, commonly called  baud)  of  the
  3236. currently selected terminal communications port to 300, 1200, 1800, 2400, 4800,
  3237. 9600, or other common speed, and on the IBM PC family, higher speeds  including
  3238. 19200, 38400, 57600, and 115200.  Both connected systems, as well as any inter-
  3239. vening communication equipment, must be able to support the specified transmis-
  3240. sion speed, and both systems should be set to the same speed.
  3241.  
  3242. Some  implementations  do  not  support  the  SET SPEED command.  But Kermit-MS
  3243. leaves the current communication port settings alone unless you issue  explicit
  3244. SET  commands  to change them, so you may use MODE or other DOS programs to es-
  3245. tablish the desired settings before running Kermit.
  3246.  
  3247. On certain systems, when you first run Kermit after powering the system up, you
  3248. may  get  a  message "Unrecognized baud rate".  This means that Kermit tried to
  3249. read the baud rate from the port and none was set.  Simply use  SET  SPEED  (if
  3250. available) or the DOS MODE command to set the desired baud rate.
  3251.  
  3252. SET BAUD is a synonym for SET SPEED.
  3253.  
  3254.  
  3255. SET TAKE-ECHO
  3256.  
  3257. Syntax: SET TAKE-ECHO {ON, OFF}
  3258.  
  3259. Specifies  whether screen display should occur during implicit or explicit TAKE
  3260. operations on MSKERMIT.INI or other Kermit-MS command files, and during evalua-
  3261. tion  of macro definitions by the DO command.  Handy for finding errors in TAKE
  3262. files or macro definitions.
  3263.  
  3264.  
  3265. SET TERMINAL
  3266.  
  3267. Syntax: SET TERMINAL {type, parameter [value]}
  3268.  
  3269. This command controls  most  aspects  of  terminal  emulation.    Most  of  the
  3270. parameters  are  only  settable  (or  meaningful) on the IBM PC family and com-
  3271. patibles.  (Programmers who are proficient on other MS-DOS systems are  invited
  3272. to  fill  in  these  functions  for  those systems and send the results back to
  3273. Columbia.)  On other systems, built-in setup modes or DOS commands can be  used
  3274. to accomplish the same functions.
  3275.  
  3276. The  first  group  of parameters tells which kind of terminal to emulate.  When
  3277. Kermit-MS uses its built-in software for emulation, incoming characters are ex-
  3278. amined  for  screen  control  commands (escape sequences) specific to that ter-
  3279. minal, and if encountered, the commands are executed on the PC screen.
  3280.  
  3281. NONE    Act as a dumb terminal.  All incoming characters will be  sent  to  the
  3282.         screen  "bare", as-is, through DOS.  If you have loaded a device driver
  3283.         into DOS for the CON device, such as ANSI.SYS, then that driver will be
  3284.         able  to  interpret  the codes itself.  Many non-IBM systems have their
  3285.         own screen control code interpreter built  into  DOS  or  firmware,  or
  3286.         available as a loadable device driver.
  3287.  
  3288. VT52    The DEC VT-52 terminal.
  3289.  
  3290. HEATH   The  Heath/Zenith-19  terminal  (H19), which supports all the VT52 com-
  3291.         mands, plus line and character insert/delete editing functions, an ANSI
  3292.         mode, and a 25th line.
  3293.  
  3294. VT102   The  DEC VT102 (ANSI) terminal, which is the same as the VT100 but also
  3295.         supports  line/character  insert/delete  editing  functions  and   ANSI
  3296.         printer controls.
  3297.  
  3298. TEK4010 A  Tektronix  4010 graphics terminal.  Currently only available on IBM,
  3299.         TI, and Victor PCs.  On the IBM family, Kermit automatically senses and
  3300.         adapts to the CGA, EGA, Monochrome, Hercules, or ATT style board.
  3301.  
  3302. On  the IBM family, you may "toggle" among the supported terminal emulations by
  3303. typing Alt-Minus.
  3304.  
  3305. The specific escape sequences supported by Kermit for each  of  these  terminal
  3306. types  are  listed in section 1.17.1.  Note that when a Kermit program includes
  3307. Tektronix emulation, this can be invoked automatically while in character  mode
  3308. (VT102, VT52, or Heath emulation) when the emulator receives certain escape se-
  3309. quences.  This can be turned off using the DISABLE TEK command.
  3310.  
  3311. The remaining SET TERMINAL commands specify setup options for the selected ter-
  3312. minal:
  3313.  
  3314. CHARACTER-SET {UK, US, ALTERNATE-ROM}
  3315.         UK displays "#" (ASCII 35, number sign) as a pound  sterling  sign,  US
  3316.         displays "#" as "#".  ALTERNATE-ROM maps accent grave and the lowercase
  3317.         letters to be national characters in the IBM video adapter.   That  is,
  3318.         character codes of 60h to 7Ah (accent grave, lower case a-z) are mapped
  3319.         to codes 80h to 9Ah.  The SET TERMINAL  CHARACTER-SET  command  applies
  3320.         only during VT100/102 emulation.
  3321.  
  3322. CLEAR-SCREEN
  3323.         Clears the screen, so that a subsequent CONNECT command shows  a  blank
  3324.         screen.  The action taken is identical to Kermit's \Kreset verb.
  3325.  
  3326. COLOR number [, number [, number]]
  3327.         Several numbers, applied in left to right sequence, separated by commas
  3328.         or spaces:
  3329.  
  3330.           0   Reset  the colors to normal intensity white characters on a black
  3331.               background and use the "no-snow" mode on the IBM  Color  Graphics
  3332.               Adapter (CGA).
  3333.           1   High intensity foreground
  3334.           10  Request fast screen updating for use on the IBM Mono, EGA, or VGA
  3335.               (usually sensed and set internally by Kermit), and  some  non-IBM
  3336.               CGAs.
  3337.           3x  Foreground color
  3338.           4x  Background color
  3339.  
  3340.         where  x is a single digit from 0 to 7, which is the sum of the desired
  3341.         colors:
  3342.  
  3343.           1   Red
  3344.           2   Green
  3345.           4   Blue
  3346.  
  3347.         Example: "SET TERMINAL COLOR 0 1 37 44" on an  IBM  CGA  would  produce
  3348.         bold  white  characters on a blue field with no snow.  The snow removal
  3349.         business has to do with whether the  program  should  synchronize  with
  3350.         vertical  retrace  when updating screen memory.  This is necessary with
  3351.         certain color adaptors (like the CGA) and unnecessary for others  (like
  3352.         the EGA).
  3353.  
  3354. CURSOR-STYLE {BLOCK, UNDERLINE}
  3355.         Sets the cursor rendition to your preference.  Note that on some  early
  3356.         IBM PCs and compatibles, the cursor may not be restored correctly after
  3357.         escaping back from CONNECT because of a bug in the early IBM BIOS.
  3358.  
  3359. DIRECTION {LEFT-TO-RIGHT, RIGHT-TO-LEFT}
  3360.         Controls  the  direction of screen display during CONNECT.  You may use
  3361.         Right-to-Left for Hebrew or Arabic, provided you have  the  appropriate
  3362.         character sets loaded.
  3363.  
  3364. KEYCLICK {ON, OFF}
  3365.         Turns electronic keyclick ON or OFF.  If your keyboard has a mechanical
  3366.         clicker  (as IBM boards do), you may not notice the effect of this com-
  3367.         mand.
  3368.  
  3369. GRAPHICS {AUTO-SENSING, CGA, EGA, VGA, HERCULES, ATT}
  3370.         Manually  selects  the  kind of display adapter for Tektronix graphics.
  3371.         AUTO-SENSING is the default, VGA means 640x480x16 colors, and  ATT  en-
  3372.         compasses  the  ATT  6300 series, Olivetti M24/M28, DEC VAXmate II, and
  3373.         the Toshiba T3100 in 640x400 b/w (see Table 1-5).
  3374.  
  3375. MARGIN-BELL {ON, OFF}
  3376.         Controls  whether  the  bell  should  be sounded when the cursor passes
  3377.         column 72 near the right screen margin; wider displays set the  bell  8
  3378.         columns from the right edge.
  3379.  
  3380. NEWLINE-MODE {ON, OFF}
  3381.         ON sends a carriage-return-linefeed combination (CRLF)  when  you  type
  3382.         carriage  return  (CR)  during  terminal emulation.  OFF (default) just
  3383.         sends a CR when you type CR.  Useful in conjunction with SET LOCAL-ECHO
  3384.         ON when CONNECTing two PC's back-to-back.
  3385.  
  3386. ROLL {ON, OFF}
  3387.         ON unrolls the screen to the bottom before adding new material  if  the
  3388.         screen had been rolled back, e.g. by Ctrl-PgUp.  ROLL OFF (the default)
  3389.         displays new material on the current screen, possibly  overwriting  old
  3390.         material.
  3391.  
  3392. SCREEN-BACKGROUND {NORMAL, REVERSE}
  3393.         NORMAL means dark background, light characters.   REVERSE  means  light
  3394.         background, dark characters.
  3395.  
  3396. TAB {AT n, CLEAR AT n, CLEAR ALL}
  3397.         Sets tab stops or clears one or all tab stops; n is the  numeric  posi-
  3398.         tion  of  the  tab  to be set or cleared.  By default, tabs are every 8
  3399.         spaces, at positions 9, 17, 25, etc.  Only meaningful when emulating  a
  3400.         terminal  that  has  settable  tabs  (the  VT52  doesn't really but the
  3401.         emulator can set them anyway).  More than one tabstop may be  specified
  3402.         by  separating  column  numbers  with commas, spaces, or tabs.  You may
  3403.         also use the notation "m:n" to specify regularly spaced tabs across the
  3404.         screen,  where  m is the initial tab position, and n is the spacing be-
  3405.         tween tabs.  132 columns are supported.
  3406.  
  3407. WRAP {ON, OFF}
  3408.         ON  automatically  breaks  screen lines (by inserting a CRLF) when they
  3409.         reach the right margin.  OFF disables wrapping --  if  a  line  is  too
  3410.         long, the excess characters go off the screen.  WRAP is OFF by default,
  3411.         since most hosts format lines to fit on your screen.
  3412.  
  3413.  
  3414. SET TIMER
  3415.  
  3416. Syntax: SET TIMER {ON, OFF}
  3417.  
  3418. This command enables or disables the timer that is used during file transfer to
  3419. break  deadlocks  that  occur when expected packets do not arrive.  By default,
  3420. the timer is ON.  If the other Kermit is providing  timeouts,  you  can  safely
  3421. turn  the  timer  OFF  to avoid unnecessary retransmissions that occur when two
  3422. timers go off simultaneously.
  3423.  
  3424.  
  3425. SET TRANSLATION
  3426.  
  3427. Syntax: SET TRANSLATION INPUT {ON, OFF, char1 char2}
  3428.  
  3429. This  command  provides  multi-language  support  (and  perhaps  other  special
  3430. effects)  during CONNECT, and during execution of the INPUT, OUTPUT, PAUSE, and
  3431. TRANSMIT script commands, but not during file transfer or at MS-Kermit  command
  3432. level.    A  character  that  arrives at the communication port (char1) will be
  3433. translated to another character (char2) before display on the screen.  As  many
  3434. as  256  characters  may  have translations specified concurrently.  But to see
  3435. characters with ASCII values higher than 127, you must also SET DISPLAY  8  and
  3436. SET PARITY NONE.
  3437.  
  3438. SET  TRANSLATION INPUT ON enables translation (the keyword INPUT is required to
  3439. allow future translation mechanisms).  OFF disables the translation and is  the
  3440. default.    So even if you have set up a translation table, you must SET TRANS-
  3441. LATION INPUT ON before it will take effect.   SHOW  TRANSLATION  tells  whether
  3442. translation is OFF or ON, and displays any current table entries.
  3443.  
  3444. Translation table entries are made by specifying byte pairs in ASCII or numeric
  3445. backslash form:
  3446.  
  3447.     SET TRANS INPUT \3 \13
  3448.  
  3449. converts incoming ASCII ETX characters (decimal 3) to ASCII  CR  (decimal  13).
  3450. 8-bit  values  are  allowed, and refer to characters in the "upper half" of the
  3451. PC's character set, either the ROM characters supplied with the PC or else sub-
  3452. stitutions provided by a special device driver.
  3453.  
  3454. A  more  practical  example shows how the user of a German PC could use the SET
  3455. TRANSLATION and SET KEY commands to make the PC's umlaut-a key (key  code  132)
  3456. send  a left curly brace ("{", ASCII 123), and to display incoming curly braces
  3457. as umlaut-a's:
  3458.  
  3459.     SET KEY \d132 \d123
  3460.     SET TRANS INP { \d132
  3461.  
  3462. (This example applies to the IBM PC German keyboard,  and  assumes  the  German
  3463. keyboard   driver,   KEYBGR,  has  been  loaded.    This  is  usually  done  in
  3464. AUTOEXEC.BAT.)
  3465.  
  3466.  
  3467. SET WARNING
  3468.  
  3469. Syntax: SET WARNING {ON, OFF}
  3470.  
  3471. Specify what to do when an incoming file is about to be stored under  the  same
  3472. name  as  an  existing  file in the target device and directory.  If ON, Kermit
  3473. will warn you when an incoming file has the same name as an existing file,  and
  3474. automatically rename the incoming file (as indicated in the warning message) so
  3475. as not to destroy (overwrite) any existing one.  If OFF, the pre-existing  file
  3476. is destroyed, even if the incoming file does not arrive completely.  WARNING is
  3477. ON by default as a safety measure, and the current setting may be  observed  in
  3478. the SHOW FILE display.
  3479.  
  3480. The  new  name  is  formed by adding numbers to the part of the name before the
  3481. dot.    For  instance,  ABC.TXT  becomes  ABC00001.TXT,  ABC00001.TXT   becomes
  3482. ABC00002.TXT,  etc.    If  the  name  already has eight characters, then digits
  3483. replace the rightmost characters.
  3484.  
  3485.  
  3486. 1.6.11. The STATUS and SHOW Commands
  3487.  
  3488. The values of MS-Kermit options that can be SET, DEFINEd, ENABLEd, or  DISABLEd
  3489. can be displayed using the STATUS or SHOW commands.
  3490.  
  3491.  
  3492. The STATUS Command
  3493.  
  3494. Syntax: STATUS
  3495.  
  3496. The  STATUS  command displays the values of the current SET options on a single
  3497. screen.  There are no operands for the STATUS command.  Use the SHOW command to
  3498. see logically-grouped settings, e.g. SHOW COMMUNICATIONS, SHOW TERMINAL.
  3499.  
  3500.  
  3501. The SHOW Command
  3502.  
  3503. Syntax: SHOW option
  3504.  
  3505. The SHOW command is used for displaying communication parameters, protocol set-
  3506. tings, macro definitions, key redefinitions, file transfer  statistics,  trans-
  3507. lations, and other common groupings.
  3508.  
  3509. SHOW COMMUNICATIONS
  3510.         displays the settings of the current serial port (port, speed,  parity,
  3511.         echo,  etc)  and  the  status of modem signals Carrier Detect, Data Set
  3512.         (modem) Ready, and Clear To Send.
  3513.  
  3514. SHOW FILE
  3515.         displays  the file transfer control settings, such as the current path,
  3516.         file discard, attributes packets on/off, warning,  end-of-file  conven-
  3517.         tion, etc.
  3518.  
  3519. SHOW KEY
  3520.         allows you to determine a key's identification code and  what  it  will
  3521.         send in CONNECT mode, most useful for obtaining the identification of a
  3522.         key when SET KEY commands will be placed in a TAKE file.  This  command
  3523.         can  be  done  only  interactively  (use  a ? to see all defined keys).
  3524.         Refer to the SET KEY description for details.
  3525.  
  3526. SHOW LOGGING
  3527.         Displays  the  names  of the session, packet, and transaction logs, and
  3528.         tells whether logging is in effect.
  3529.  
  3530. SHOW MACROS [macroname]
  3531.         displays  the  definitions  of all currently defined macros, as well as
  3532.         the amount of space left for new macro definitions. A  macro  name,  or
  3533.         abbreviation, can be included to restrict the list, e.g. SHOW MACRO IBM
  3534.         will display the definition of the IBM macro, and  SHOW  MACRO  X  will
  3535.         list the definitions of all macros whose names begin with X.
  3536.  
  3537. SHOW MODEM
  3538.         displays the status of the modem  signals  DSR  (dataset  ready,  modem
  3539.         tells  the  PC  that  it  is turned on and in data mode), CTS (clear to
  3540.         send, modem grants the PC permission to send  data),  and  CD  (carrier
  3541.         detect,  local  modem  tells  the PC that it is connected to the remote
  3542.         modem).  The results may be misleading if your asynchronous adapter, or
  3543.         the  connector  or  cable that is attached to it, is strapped to supply
  3544.         these modem signals itself.
  3545.  
  3546. SHOW PROTOCOL
  3547.         displays  the values of the Kermit protocol-related parameters, includ-
  3548.         ing all the SET SEND and  SET  RECEIVE  parameters,  plus  whether  the
  3549.         timer, attribute packets, and logging are enabled.
  3550.  
  3551. SHOW SCRIPTS
  3552.         displays the script-related variables.
  3553.  
  3554. SHOW SERVER
  3555.         displays which server functions are enabled and disabled.
  3556.  
  3557. SHOW STATISTICS
  3558.         displays counts of characters sent and received during file  transfers,
  3559.         for  both  the  most recent transfer and the entire session, and an es-
  3560.         timate of the average baud rate while sending and listening.
  3561.  
  3562. SHOW TERMINAL
  3563.         displays  the  terminal settings, which terminal is being emulated, the
  3564.         tab stops, etc.
  3565.  
  3566. SHOW TRANSLATION
  3567.         displays  the  entries in the 256 byte input translation table.  Values
  3568.         are expressed numerically to avoid  confusion  with  different  display
  3569.         adapters, and the command shows only entries for which input and output
  3570.         codes differ.
  3571.  
  3572.  
  3573. 1.7. Macros
  3574.  
  3575. Like TAKE files, macros provide a way of collecting many commands into a single
  3576. command.    The difference between a macro and a TAKE file is that Kermit keeps
  3577. all its macro definitions in memory, and can execute them as many times as  you
  3578. like,  without  having  to look them up on disk, whereas every time you issue a
  3579. TAKE command, Kermit has to access a disk.  But... you can have  as  many  TAKE
  3580. command  files  as  you  like,  and  they  can  be as long as you want, whereas
  3581. MS-Kermit's memory for storing macro definitions is limited.  You can put macro
  3582. definitions and DO commands for them in TAKE files, or for that matter, you can
  3583. put TAKE commands in macro definitions.  There is a limit of 25  simultaneously
  3584. active  TAKE  files  plus active macros; a TAKE file or macro remains active if
  3585. the last item invokes another TAKE or macro command.  Active here means  Kermit
  3586. is reading commands from them, not just storing them for later.
  3587.  
  3588.  
  3589. The DEFINE Command
  3590.  
  3591. Syntax: DEFINE macro-name [command [, command [, ...]]]
  3592.  
  3593. Kermit-MS  command  macros  are  constructed  with  the  DEFINE  command.   Any
  3594. Kermit-MS commands may be included.  Example:
  3595.  
  3596.     define telenet set parity mark, set speed 1200, connect
  3597.  
  3598. A macro can be undefined by typing an empty DEFINE command for it, like
  3599.  
  3600.     define telenet
  3601.  
  3602. A macro definition may be up to 255 character long.  This example shows a  long
  3603. definition in which lines are continued with hyphenation:
  3604.  
  3605.     define setup set port 1, set speed 19200, set parity even,-
  3606.     set flow none, set handshake xon, set local-echo on,-
  3607.     set timer on, set terminal color 1 31 45,-
  3608.     set warning on, set incomplete keep, connect
  3609.  
  3610. Longer definitions can be accomplished by "chaining."  Example:
  3611.  
  3612.     define setup set port 1, set speed 19200, set par even, do setup2
  3613.     define setup2 set flo no, set handsh xon, set local on, do setup3
  3614.     define setup3 set timer on, set terminal color 1 31 45, do setup4
  3615.     define setup4 set warning on, set incomplete keep, connect
  3616.  
  3617. DO  SETUP  or just SETUP will invoke all of these commands.  Commas are used to
  3618. separate commands in macro definitions; carriage returns (\13) cannot be  used.
  3619. When  control or other special characters are needed in a macro they may be ex-
  3620. pressed in backslash number form, \nnn.
  3621.  
  3622. The SHOW MACROS command displays the values of currently  defined  macros,  and
  3623. tells how much space is left for further definitions.
  3624.  
  3625. The  definition  of the macro is entered literally; variables are not evaluated
  3626. (see ASSIGN, below).
  3627.  
  3628.  
  3629. The DO Command
  3630.  
  3631. Syntax: [DO] macro-name [parameters...]
  3632.  
  3633. A Kermit-MS macro is invoked using the DO command.    For  instance,  Kermit-MS
  3634. comes  with  a  predefined  macro  to  allow convenient setup for IBM mainframe
  3635. line-mode communications; to invoke it, you would type DO IBM.  The  IBM  macro
  3636. is defined as "set timer on, set local-echo on, set parity mark, handshake xon,
  3637. set flow none".  You can use the DEFINE  command  to  redefine  this  macro  or
  3638. remove the definition altogether.
  3639.  
  3640. There  is  no  automatic way to undo the effect of a macro.  If you need to ac-
  3641. complish this effect, you should define another macro for that  purpose.    For
  3642. instance,  to  undo the effect of "do ibm" so that you could connect to, say, a
  3643. DEC VAX, you could:
  3644.  
  3645.   def vax set parity none, set handshake none, set flow xon/xoff,-
  3646.   set timer off, set local-echo off
  3647.  
  3648. Then you can "do ibm" whenever you want to use the IBM  system,  and  "do  vax"
  3649. whenever you want to use the VAX.
  3650.  
  3651. If  you  wish  to view the macro expansion whenever you issue a DO command, you
  3652. can SET TAKE-ECHO ON.
  3653.  
  3654. As a convenience the word DO may be omitted.  However, when question-mark  help
  3655. is sought at the Kermit prompt, only the main keyword help table will be shown.
  3656. If you want to see the available macros, type "do ?" or SHOW MACROS.  Use of DO
  3657. is  recommended  for  overall  clarity unless a favorite macro is executed fre-
  3658. quently.
  3659.  
  3660.  
  3661. Variables
  3662.  
  3663. Macros can use substitution variables similar to those of DOS Batch.  The  name
  3664. of  a  substitution  variable  is  of  the form "\%character", where the single
  3665. character is a digit or a letter or other 8-bit character whose ASCII value  is
  3666. 48  decimal  or  larger;  upper and lower case letters are considered to be the
  3667. same character.  A substitution variable is defined as a string of text by  the
  3668. DEFINE  command  (the  variables are in fact macros) and Kermit replaces occur-
  3669. rences of the variable name with that text, hence the word "substitution".  For
  3670. example,
  3671.  
  3672.     Kermit-MS>define \%a this is substituted material
  3673.     Kermit-MS>echo I wonder if \%a or not.
  3674.  
  3675. yields the display:
  3676.  
  3677.     I wonder if this is substituted material or not.
  3678.  
  3679. Another example:
  3680.  
  3681.     Kermit-MS>define \%c set port 1,set speed 9600,set parity even,connect
  3682.  
  3683. Then
  3684.  
  3685.     Kermit-MS>\%c
  3686.  
  3687. is equivalent to
  3688.  
  3689.     Kermit-MS>set port com1
  3690.     Kermit-MS>set speed 9600
  3691.     Kermit-MS>set parity even
  3692.     Kermit-MS>connect
  3693.  
  3694. The special subset of substitution variables, \%1 .. \%9, is similar to the DOS
  3695. Batch variable set %1 .. %9.  The DO command can  accept  arguments  after  the
  3696. macro  name and the individual words in the arguments become the definitions of
  3697. \%1, etc, for up to nine words, in order.  For  example,  given  the  following
  3698. definition:
  3699.  
  3700.     def dial ATDT\%1\13,input 30 CONNECT,connect,in Login:,out \%2\13
  3701.  
  3702. the following command can be used to dial any phone number:
  3703.  
  3704.     Kermit-MS>do dial 555-1212 myname
  3705.  
  3706. The word DO may be omitted, as in:
  3707.  
  3708.     Kermit-MS>dial 555-1212 myname
  3709.  
  3710. This command automatically assigns the value "555-1212" to variable the \%1 and
  3711. "myname" to \%2, and uses these values while dialing the phone and logging into
  3712. the host system.  If fewer than nine words are seen the remaining variables are
  3713. not changed.  For example, if the line above was busy, you could  dial  a  dif-
  3714. ferent  number  and  omit  the username because it will be remembered from last
  3715. time.
  3716.  
  3717. If it is desired to assign multiple words to a single  variable,  they  can  be
  3718. grouped in braces, for example
  3719.  
  3720.     Kermit-MS>dial {212 555 1212} myname
  3721.  
  3722. Substitution  variables  can  reference  other  substitution variables in their
  3723. definitions.  Care is needed to prevent circular definitions,  but  even  those
  3724. are  detected  by  Kermit.  Subtle circular executions could cause Kermit to go
  3725. into an endless loop; if you think this is happening, type a Control-C  to  in-
  3726. terrupt  the  process.  To clarify matters, the definition string of a variable
  3727. is substituted for the variable's name when the name is observed in a  left  to
  3728. right scan of a command.  For example,
  3729.  
  3730.     Kermit-MS>define \%a echo This is \%b example: \%b.
  3731.     Kermit-MS>define \%b a mac\%c expansion
  3732.     Kermit-MS>define \%c ro string
  3733.     Kermit-MS>\%a
  3734.  
  3735. displays:
  3736.  
  3737.     This is a macro string expansion example: a macro string expansion.
  3738.  
  3739. If  this  example is entered manually then when the final \%a is typed the com-
  3740. mand line is immediately replaced with the fully expanded command and more  in-
  3741. put  is  solicited  (such  as  a carriage return).  Try it.  Check the variable
  3742. definitions with the SHOW MACRO command.
  3743.  
  3744. A variable can be undefined (deleted) by defining it as an empty string:
  3745.  
  3746.     Kermit-MS>define \%c
  3747.  
  3748. DOS batch file arguments may be transformed into  Kermit  variables.    Suppose
  3749. file TEST.BAT holds the line:
  3750.  
  3751.     Kermit define \%%1 %1, define \%%a %2, stay
  3752.  
  3753. Invoking the Batch file by:
  3754.  
  3755.     C>test one two
  3756.  
  3757. results  in creating Kermit variables \%1 with definition of "one" and \%a with
  3758. definition "two". The doubled percent symbols in the Batch file are  needed  to
  3759. compensate  for  one  of them being consumed by the DOS Batch processor.  %1 is
  3760. the first Batch argument word, %2 is the second word.  The syntax \%%1 is  con-
  3761. verted  by Batch to be \%1 when seen by Kermit, without further substitution by
  3762. Batch.
  3763.  
  3764.  
  3765. The ASSIGN Command
  3766.  
  3767. Syntax: ASSIGN
  3768.  
  3769. The DEFINE command does not evaluate the definition.  For instance, the command
  3770.  
  3771.     define \%a \%1
  3772.  
  3773. simply defines the variable \%a to be "\%1", not the current value of \%1 -- if
  3774. \%1 changes, then so does \%a.  To copy the value of one variable  to  another,
  3775. use the ASSIGN command:
  3776.  
  3777.     assign \%a \%1
  3778.  
  3779. This  copies  the  value of \%1 to \%a, so that if \%1 changes, \%a will retain
  3780. the previous value.  Example:
  3781.  
  3782.     Kermit-MS>define \%a foo
  3783.     Kermit-MS>define \%b \%a
  3784.     Kermit-MS>echo \%a \%b
  3785.     foo foo
  3786.     Kermit-MS>assign \%c \%a
  3787.     Kermit-MS>define \%a new
  3788.     Kermit-MS>echo \%a \%b
  3789.     new new
  3790.     Kermit-MS>echo \%a \%c
  3791.     new foo
  3792.  
  3793.  
  3794. 1.8. SCRIPTS
  3795.  
  3796. A script is a file or a macro containing Kermit commands to be executed.   What
  3797. distinguishes  a  script  from ordinary TAKE files or macros is the presence of
  3798. INPUT, REINPUT, OUTPUT, PAUSE, ECHO, ASK, CLEAR, IF, GOTO, and WAIT commands to
  3799. automatically detect and respond to information flowing though the serial port,
  3800. actions which otherwise would be performed by the user  during  CONNECT.    The
  3801. login sequence of a host computer is a classical example.
  3802.  
  3803. It  is  a  common, but incorrect, assumption that text to be sent to the remote
  3804. computer can be included in a TAKE file after the CONNECT command:
  3805.  
  3806.     set speed 9600        ; MS-Kermit command
  3807.     connect               ; MS-Kermit command
  3808.     run kermit            ; Text to be sent to other system
  3809.     send foo.bar          ; Text to be sent to other system
  3810.     ^]c                   ; Escape sequence to get back to MS-Kermit
  3811.     receive               ; MS-Kermit command
  3812.  
  3813. The reason this doesn't work is that during  CONNECT,  MS-Kermit  always  reads
  3814. from the real keyboard, and not from the take file.  Even if this technique did
  3815. work, it would still run into synchronization  problems.    But  these  can  be
  3816. avoided  when  there  is a way to coordinate the commands that we send with the
  3817. remote system's responses.  Kermit's  script  commands  provide  this  ability.
  3818. They  may  be  freely  intermixed in a TAKE file or macro with any other Kermit
  3819. commands to achieve any desired effect.  The OUTPUT command sends the specified
  3820. characters as if the user had typed them; the INPUT command reads the responses
  3821. and compares them with specified character strings, just as the user would do.
  3822.  
  3823. The script commands include INPUT, REINPUT, OUTPUT, PAUSE, WAIT, ECHO, IF, ASK,
  3824. and  GOTO.  These commands may be interrupted by typing Ctrl-C at the keyboard.
  3825. The INPUT, REINPUT, PAUSE, and WAIT commands accept a  following  number  as  a
  3826. timeout  value.  The  number  is interpreted as seconds from the present or, if
  3827. given in hh:mm:ss form, as a specific time of day.  In either case, the timeout
  3828. interval must be within 12 hours of the present to avoid it being considered as
  3829. in the past (expired).
  3830.  
  3831. HINT:  It is recommended that a console  driver  such  as  ANSI.SYS  be  loaded
  3832. during  executing  of  a script.  This is because Kermit's terminal emulator is
  3833. active only during the CONNECT command, and any PC/host interactions that occur
  3834. during  script  execution  may  appear  fractured  on the screen.  This is par-
  3835. ticularly true of full-screen login applications,  like  through  an  IBM  3270
  3836. protocol converter.
  3837.  
  3838.  
  3839. The CLEAR Command
  3840.  
  3841. Syntax: CLEAR
  3842.  
  3843. The  CLEAR command empties the buffers of the serial port to forget any earlier
  3844. material.  This gets the INPUT command off to a clean start.  (This command was
  3845. called  CLRINP  in 2.29B and earlier, and CLEAR was used to erase macro and key
  3846. definition memory).
  3847.  
  3848.  
  3849. The ECHO Command
  3850.  
  3851. Syntax: ECHO text
  3852.  
  3853. The ECHO command is useful for reporting progress of a script, or prompting the
  3854. user  for  interactive input.  The text is displayed on the screen, and may in-
  3855. clude backslash notation for control or 8-bit characters.  An implied  linefeed
  3856. is included at the beginning of the text.
  3857.  
  3858.  
  3859. SET INPUT
  3860.  
  3861. Syntax: SET INPUT {CASE, DEFAULT-TIMEOUT, ECHO, TIMEOUT-ACTION}
  3862.  
  3863. The SET INPUT command controls the behavior of the script INPUT command:
  3864.  
  3865. SET INPUT CASE {IGNORE, OBSERVE}
  3866.     Says whether or not to distinguish upper and lower case letters when  doing
  3867.     a  matchup  in the INPUT command.  OBSERVE causes upper and lower case let-
  3868.     ters to be distinguished.  The default is to IGNORE case distinctions.
  3869.  
  3870. SET INPUT DEFAULT-TIMEOUT seconds
  3871.     Changes  the  default  waiting time from one second to this new value.  The
  3872.     value is used when an INPUT command has no timeout specified.
  3873.  
  3874. SET INPUT ECHO {ON, OFF}
  3875.     Show  on  the screen characters read from the serial port during the script
  3876.     operation, or not.  Default is ON, show them.
  3877.  
  3878. SET INPUT TIMEOUT-ACTION {PROCEED, QUIT}
  3879.     Determines  whether  or not the current macro or TAKE command file is to be
  3880.     continued or exited if a timeout occurs.  PROCEED is the default and  means
  3881.     that  timeouts  are  ignored.    QUIT  causes the current script file to be
  3882.     exited and control passed to either the next higher level script  file  (if
  3883.     there is one) or to Kermit's main prompt.
  3884.  
  3885. The SHOW SCRIPTS command displays the SET INPUT values.
  3886.  
  3887.  
  3888. The INPUT command
  3889.  
  3890. Syntax: INPUT [timeout] {search-string, @filespec}
  3891.  
  3892. INPUT  is  the  most powerful of the script commands.  It reads characters from
  3893. the serial port continuously until one  of  two  things  occurs:  the  received
  3894. characters match the search string or the time limit expires.  Matching strings
  3895. is the normal use, as in:
  3896.  
  3897.     Kermit-MS>input 5 Login please:
  3898.  
  3899. to recognize the phrase "Login please:", or else time out after waiting  for  5
  3900. seconds.   A special binary character \255 or \o377 or \xFF stands for the com-
  3901. bination carriage return and a line feed, in either order, to simplify  pattern
  3902. matching.  The command reports a testable status of SUCCESS or FAILURE and sets
  3903. the DOS ERRORLEVEL parameter to 2 if it fails to match within the  timeout  in-
  3904. terval.    Characters  are stored in a 128 byte buffer for later examination by
  3905. REINPUT, discussed below.
  3906.  
  3907. Beware of characters arriving with parity set because the pattern matching con-
  3908. siders  all 8 bits of a byte unless the local parity is other than NONE and SET
  3909. DISPLAY is 7-BITS.  Arriving characters are  modified  by  first  removing  the
  3910. parity  bit, if parity is other than NONE, then they are passed through the SET
  3911. TRANSLATION INPUT converter, the high bit is again suppressed if SET DISPLAY is
  3912. 7-BITs, the result is logged and stored for pattern matching.
  3913.  
  3914.  
  3915. The REINPUT command
  3916.  
  3917. Syntax: REINPUT [timeout] {search-string, @filespec}
  3918.  
  3919. The  REINPUT command is like INPUT except that characters are read from the 128
  3920. byte serial port history buffer rather than always seeking fresh input from the
  3921. port.   The purpose is to permit the current text to be examined several times,
  3922. looking for different match strings.  A common case is reading the results of a
  3923. connection  message  from  a  modem  which  might be "CONNECT 1200" or "CONNECT
  3924. 2400", depending on the other modem.  If the history buffer has less  than  128
  3925. bytes then fresh input may be requested while seeking a match, until the buffer
  3926. is full.  REINPUT match searches begin at the start of the buffer whereas INPUT
  3927. searches  never  go  back  over examined characters.  REINPUT sets the testable
  3928. status of SUCCESS or FAILURE and DOS ERRORLEVEL, just as for INPUT.
  3929.  
  3930. When a script fails because an INPUT or REINPUT command did not  encounter  the
  3931. desired string within the timeout interval the message "?Timeout" is displayed.
  3932.  
  3933.  
  3934. The OUTPUT command
  3935.  
  3936. Syntax: OUTPUT {string, @filespec}
  3937.  
  3938. The  OUTPUT command writes the indicated character string to the serial port as
  3939. ordinary text.  The string may contain control or other special binary  charac-
  3940. ters  by  representing  them  in backslash form.  Carriage Return (CR), for ex-
  3941. ample, is \13 decimal, \o15 octal, or \x0D hexadecimal.   The  string  may  use
  3942. 8-bit characters if the communications parity is type NONE.  A special notation
  3943. is also provided, \b or \B, which causes a BREAK signal to be transmitted.
  3944.  
  3945. The string to be transmitted starts with the first non-spacing character  after
  3946. the  OUTPUT command and ends at either the end of line or, if executed within a
  3947. TAKE file, at a semicolon (if you need to output a semicolon from within a TAKE
  3948. file,  use  backslash  notation, e.g. "\59").  Indirectly obtained strings, the
  3949. @filespec form, read the first line of the file up to but not including the ex-
  3950. plicit carriage return.
  3951.  
  3952. As a convenience, text arriving at the serial port during the OUTPUT command is
  3953. shown on the screen if SET INPUT-ECHO is ON, and stored in a 128-byte  internal
  3954. buffer for rereading by subsequent (RE)INPUT commands.
  3955.  
  3956. The  INPUT,  REINPUT,  and OUTPUT commands have a special syntax to replace the
  3957. normal string with text obtained from a file or device:
  3958.  
  3959.     OUTPUT @filespec
  3960.     INPUT @filespec
  3961.  
  3962. Both forms read one line of text from the file or device  and  use  it  as  the
  3963. desired  string.    A common use is to wait for a password prompt and then read
  3964. the password from the console  keyboard.    A  string  starts  with  the  first
  3965. non-spacing character and ends at either the end of line or, if executed within
  3966. a TAKE file, at a semicolon.  Indirectly obtained strings, the @filespec  form,
  3967. read  the  first line of the file up to but not including the explicit carriage
  3968. return.  Note if a trailing carriage return is  needed  it  must  be  expressed
  3969. numerically, such as \13 decimal.  Example:
  3970.  
  3971.     input 7 Password:
  3972.     echo Please type your password:
  3973.     output @con
  3974.     output \13
  3975.     echo \13\10Thank you!
  3976.  
  3977. In  this  example, a TAKE file requests the user to type in the password inter-
  3978. actively, so that it does not have to be stored on disk as  part  of  the  TAKE
  3979. file.
  3980. The PAUSE command
  3981.  
  3982. Syntax: PAUSE [{number, hh:mm:ss}]
  3983.  
  3984. PAUSE turns on the DTR signal, and then waits one or more seconds, or until the
  3985. specified time of day.  Pauses are frequently necessary  to  avoid  overdriving
  3986. the  host  and to let a modem proceed through a dialing sequence without inter-
  3987. ruptions from Kermit.  The default waiting time is set by  SET  INPUT  DEFAULT-
  3988. TIMEOUT  and  is  normally one second.  The optional integer number selects the
  3989. number of seconds to pause  for  this  command,  and  the  hh:mm:ss  selects  a
  3990. specific time of day.  An explicit value of zero produces a pause of just a few
  3991. milliseconds which can be useful in some situations.
  3992.  
  3993. Text arriving during the  PAUSE  interval  is  shown  on  the  screen,  if  SET
  3994. INPUT-ECHO  is  ON, and stored in a 128-byte internal buffer for rereading by a
  3995. following INPUT command.
  3996.  
  3997. PAUSE is interrupted if there is any activity on the keyboard.  Thus PAUSE  can
  3998. be useful for operations like:
  3999.  
  4000.     echo "Type any key when ready..."
  4001.     pause 9999
  4002.  
  4003. PAUSE  is  useful  in scripts that are to be executed at some future time.  For
  4004. instance, if you want your PC to dial up another  computer  and  transfer  some
  4005. files at 9:30pm, when the phone rates are lower, you can put the command
  4006.  
  4007.     PAUSE 21:30:00
  4008.  
  4009. in your script file.  Note that you cannot specify a time more than 12 hours in
  4010. the future.  If you need to pause until a specific time that is  more  than  12
  4011. hours away, you can use multiple PAUSE statements:
  4012.  
  4013.     PAUSE 21:30:00  ; Pause until 9:30pm tonight
  4014.     PAUSE  9:30:00  ; Pause until 9:30am tomorrow morning
  4015.  
  4016. Because  PAUSE  turns  on the DTR signal, it can be useful in scripts where DTR
  4017. must be asserted for a second or two to wake up the device your PC is connected
  4018. to, before you can send any characters to it:
  4019.  
  4020.     pause 1         ; Assert DTR and pause for 1 second
  4021.     output \13      ; Send a carriage return
  4022.  
  4023.  
  4024. The WAIT Command
  4025.  
  4026. Syntax: WAIT [{number, hh:mm:ss}] [\CD] [\CTS] [\DSR]
  4027.  
  4028. WAIT performs a timed PAUSE, as above, but also examines the modem control sig-
  4029. nals Carrier Detect (\CD), Clear To Send (\CTS), and/or Data Set (modem)  Ready
  4030. (\DSR).    If all of the signals specified in the WAIT statement are ON, or be-
  4031. come ON before the timeout interval, the wait operation ceases with an  indica-
  4032. tion  of  SUCCESS.    If the time interval expires without all of the specified
  4033. signals on, the status is FAILURE.  Example:
  4034.  
  4035.     Kermit-MS> wait 12:45:00 \cd \dsr
  4036.  
  4037. This waits until both CD and DSR  asserted  or  until  45  minutes  past  noon,
  4038. whichever happens first, returning SUCCESS or FAILURE respectively.
  4039.  
  4040. If no modem signals are specified, then WAIT is the same as PAUSE.
  4041.  
  4042.  
  4043. Labels and the GOTO Command
  4044.  
  4045. Labels  and  the GOTO command work together in the same fashion as in DOS Batch
  4046. files.  A label is a line which starts with a colon (:) in the leftmost  column
  4047. followed immediately by a word of text (no intervening spaces); material on the
  4048. line after the label is ignored.  The GOTO command is followed by a label,  the
  4049. leading colon is optional in the GOTO command.  The label may be located either
  4050. before or after the GOTO command and is found by searching  the  TAKE  file  or
  4051. macro  from  the  beginning.  Thus, duplicated labels will always use the first
  4052. occurrence.  The target label must be in the current TAKE file  or  macro;  one
  4053. may not GOTO a label in another TAKE file or macro.  Example:
  4054.  
  4055.     :LOOP
  4056.     echo again and\32
  4057.     goto loop
  4058.  
  4059. will  print "again and again and again and..." forever (until you type Ctrl-C).
  4060. As a macro:
  4061.  
  4062.     define test :loop,echo again and\32,goto loop
  4063.     do test
  4064.  
  4065. Note that if a label follows a comma in a macro definition, there  must  be  no
  4066. intervening spaces:
  4067.  
  4068.     define test ..., :top, ..., goto top  ; bad, space before colon.
  4069.     define best ...,:top, ..., goto top   ; good, no space.
  4070.  
  4071. In this example, the best macro will work, the test macro won't.
  4072.  
  4073.  
  4074. The IF Command
  4075.  
  4076. Syntax: IF test-condition MS-Kermit Command
  4077.  
  4078. The  IF  command  gives  MS-Kermit scripts the ability to make a decision based
  4079. upon the criterion specified as the test-condition.  If the test  condition  is
  4080. true,  then  the command is executed.  Otherwise, it is skipped.  The test con-
  4081. ditions are:
  4082.  
  4083.     NOT     Modifier for other conditions below.
  4084.  
  4085.     ALARM   True if the current time of day is at or later than the alarm clock
  4086.             time.    The alarm clock time is set by the command SET ALARM time.
  4087.             IF ALARM distinguishes early from late with  a  12  hour  field  of
  4088.             view.
  4089.  
  4090.     COUNT   True  if the current COUNT variable is greater than zero.  COUNT is
  4091.             a special Kermit variable for each active TAKE file or macro.    It
  4092.             is  set by the command SET COUNT and it is both tested and modified
  4093.             by the IF COUNT command.  The intent is to construct simple  script
  4094.             loops  where the IF COUNT command first decreases COUNT by one (but
  4095.             never below zero) and then if COUNT is greater than zero  the  fol-
  4096.             lowing  Kermit  command is executed.  Because COUNT exists only for
  4097.             TAKE files and macros it cannot be used interactively.   Each  TAKE
  4098.             file  or  macro has its own distinct copy of COUNT, and nested TAKE
  4099.             files or macros do not interact through their  COUNTs.    Initially
  4100.             COUNT is zero.
  4101.  
  4102.     DEFINED symbol
  4103.             True if the named macro or variable is defined.  You can  use  this
  4104.             feature to remember things for future reference.
  4105.  
  4106.     EQUAL word1 word2 command
  4107.             True if the two words are lexically equal.  Alphabetic case is  ig-
  4108.             nored  unless SET INPUT CASE OBSERVE.  If they match, the following
  4109.             command is executed.  The modifier NOT may be  inserted  to  invert
  4110.             the sense of the test.  Substitution variables may be used in place
  4111.             of word1 and word2, but the command will only work if  these  vari-
  4112.             ables  contain  single words, not phrases.  If word1 or word2 begin
  4113.             with @, then the  rest  of  the  word  is  interpreted  as  a  file
  4114.             specification, and the first word in the file is used.
  4115.  
  4116.     ERRORLEVEL number
  4117.             True if the DOS errorlevel number  matches  or  exceeds  the  given
  4118.             (decimal) number.
  4119.  
  4120.     EXIST filespec
  4121.             True if the specified file exists.
  4122.  
  4123.     FAILURE True if  the  previous  status-returning  Kermit  command  reported
  4124.             failure.
  4125.  
  4126.     SUCCESS True  if the previous status-returning Kermit command reported suc-
  4127.             cess.  When using IF SUCCESS and IF FAILURE, it is important to SET
  4128.             INPUT  TIMEOUT  PROCEED, otherwise the script will quit immediately
  4129.             upon a failing INPUT or REINPUT, before getting to  the  IF  state-
  4130.             ment.
  4131.  
  4132. IF  commands  are closely modeled on those of DOS Batch files, for familiarity.
  4133. They consist of a test condition, perhaps modified by the leading word NOT, and
  4134. then  any  legal  Kermit command.  GOTO is an especially useful command here to
  4135. branch in the TAKE file or macro.
  4136.  
  4137. The "object" of an IF command is a Kermit command, which can be:
  4138.  
  4139.    - A regular, predefined Kermit command, like SEND FOO.BAR or SET  SPEED
  4140.      1200.
  4141.  
  4142.    - A GOTO, allowing subsequent statements to be skipped.
  4143.  
  4144.    - Another  IF  command,  as  in  IF  DEFINED  \%3 IF EXIST FOO.BAR SEND
  4145.      FOO.BAR.  The SEND command is executed only if both IF conditions are
  4146.      true.
  4147.  
  4148.    - A  macro.  This allows a semblence of structured programming, with an
  4149.      implied "begin" and "end" around the commands that compose the macro.
  4150.      For instance:
  4151.  
  4152.          define giveup echo I give up!, hangup, stop
  4153.          input 10 Login:
  4154.          if failure giveup
  4155.          output myusername
  4156.  
  4157. The  Kermit  commands which yield SUCCESS or FAILURE conditions are: GET, SEND,
  4158. RECEIVE, the REMOTE commands, INPUT, REINPUT, BYE, FINISH, LOGOUT, and WAIT.
  4159.  
  4160.  
  4161. The POP and STOP Commands
  4162.  
  4163. Use these commands for terminating execution of a TAKE file or macro.  POP ter-
  4164. minates  the  current level and returns to the previous level.  For example, if
  4165. you gave the command "take shower", and the SHOWER  file  contained  a  command
  4166. "take  bath", and the BATH file contained a command "take hike", and a POP com-
  4167. mand was encountered in the HIKE file, then the next command executed would  be
  4168. the  one following the "take hike" command in the BATH file.  If a STOP command
  4169. was encountered in any of these files, MS-Kermit would  return  immediately  to
  4170. interactive  command  level.   POP and STOP work in similar fashion with nested
  4171. macro invocations: POP returns to the invoking macro, STOP returns  to  command
  4172. level.
  4173. Script Examples
  4174.  
  4175. A  counting  loop.    This  TAKE file excerpt says hello three times, then says
  4176. goodbye:
  4177.  
  4178.     set count 3             ; Prime the loop counter for three passes
  4179.     :TOP                    ; A label for GOTO
  4180.     echo Hello\13           ; Something to see, with carriage return
  4181.     if count goto top       ; Loop if COUNT is greater than zero
  4182.     echo Goodbye!\13
  4183.  
  4184. Figure 1-2 shows a simple script file that logs in to a computer, prompting the
  4185. user  for her password using the @con construction, and then connects as a ter-
  4186. minal.  Notice the semicolons used to indicate comments  in  TAKE  files.    If
  4187.  
  4188. -------------------------------------------------------------------------------
  4189.  
  4190.  
  4191.     define ermsg echo \%1\13, stop       ; Define an error handling macro.
  4192.     clear                                ; Clear the input buffer.
  4193.     set speed 9600                       ; Set the transmission speed.
  4194.     output \13                           ; Carriage return to awaken host.
  4195.     input 15 Login:                      ; Wait up to 15 secs for prompt.
  4196.     if failure ermsg No_login_prompt!    ; Give up if none.
  4197.     output Sari\13                       ; Send username and CR.
  4198.     set input echo off                   ; Privacy, please.
  4199.     input 5 Password:                    ; Quietly wait for this.
  4200.     if failure ermsg No_password_prompt! ; Give up if it doesn't come.
  4201.     echo Type your password now...       ; Make our own prompt.
  4202.     output @CON                          ; Send console keystrokes.
  4203.     output \13                           ; Add a real carriage return.
  4204.     input 30 $                           ; Wait for system prompt.
  4205.     if failure ermsg No_system_prompt!   ; Give up if none.
  4206.     connect                              ; Start terminal emulation.
  4207.  
  4208.                  Figure 1-2:  MS-Kermit Script for Logging In
  4209.  
  4210. -------------------------------------------------------------------------------
  4211.  
  4212. these  same  commands  were  typed  by  hand at the Kermit prompt the semicolon
  4213. material would be considered part of a string!  Typing a Control-C will  inter-
  4214. rupt and terminate any of the commands.
  4215.  
  4216. Figure 1-3 illustrates some detailed control of the Hayes 2400 modem.  Some un-
  4217. derstanding of the Hayes dialing  language  is  helpful  for  deciphering  this
  4218. script  (consult  your  Hayes modem manual).  If the script is stored in a file
  4219. called HAYES.SCR, then a DIAL macro can be defined like this:
  4220.  
  4221.     define dial take hayes.scr
  4222.  
  4223. The trick here is that any invocation of the "dial" or "do dial"  command  with
  4224. an  operand  will set the variable \%1, which is used in the TAKE file, for in-
  4225. stance:
  4226.  
  4227.     dial 765-4321
  4228.  
  4229. will set \%1 to "765-4321", the number to be dialed.  You can also type
  4230.  
  4231.     dial {212 765 4321}
  4232.  
  4233. if you want to include spaces in the phone number.  This script  requires  ver-
  4234. sion 2.32 of Kermit or later.
  4235.  
  4236. -------------------------------------------------------------------------------
  4237.  
  4238.  
  4239.     def errstop echo \%1\13, def \%1, hang, stop ; Error handler.
  4240.     if not defined \%1 errstop {Please supply a phone number!}
  4241.     assign \%n \%1                       ; Copy the phone number.
  4242.     clear                                ; Clear the input buffer.
  4243.     set speed 2400                       ; Dial at high speed.
  4244.     wait 2 \cts                          ; Is modem turned on?
  4245.     if fail errstop {Please turn on your modem.} ; No.
  4246.     echo Initializing modem...\13\10     ; Yes.
  4247.     output ATZ\13                        ; Reset the modem.
  4248.     pause 2                              ; Give it a little time.
  4249.     output AT F1 Q0 V1 X4 S0=0\13        ; Put modem in known state.
  4250.     input 8 OK                           ; Look for response.
  4251.     if fail errstop {Can't initialize modem.}
  4252.     pause 1                              ; Pause for a second first.
  4253.     set count 5                          ; Set the redial limit.
  4254.     define \%d \13Dialing                ; Initial dial message.
  4255.     :REDIAL
  4256.     echo \%d \%n...\13\10                ; Tell them we're dialing.
  4257.     output ATDT\%n\13                    ; Dial the phone number.
  4258.     clear                                ; Clear away the command echo.
  4259.     input 60 CONNECT                     ; Wait for CONNECT message.
  4260.     if success goto speed                ; Got it, go check speed.
  4261.     define \%m No dialtone or no answer. ; Make this the error message.
  4262.     reinput BUSY                         ; Didn't connect.  Was it busy?
  4263.     if failure errstop {\%m\10\13Try again later.} ; No
  4264.     Echo \13Busy...                      ; It's busy, let them know.
  4265.     hangup                               ; Drop DTR momentarily.
  4266.     pause 60                             ; Wait one minute.
  4267.     define \%d \13Redialing              ; Change message to "Redialing".
  4268.     if count goto redial                 ; Then go redial.
  4269.     define \%m \13Line busy.             ; After 5 tries set this message.
  4270.     :SPEED                               ; Connected!
  4271.     pause 1                              ; Wait for text after CONNECT.
  4272.     define \%s 2400                      ; Assume speed is 2400.
  4273.     reinput 1 2400                       ; Rescan current text for "2400"
  4274.     if success goto done                 ; It is.
  4275.     define \%s 1200                      ; It isn't, so assume 1200.
  4276.     reinput 1 1200                       ; Is it?
  4277.     if failure define \%s 300            ; It isn't, so it must be 300.
  4278.     :DONE                                ; We know the speed.
  4279.     set speed \%s                        ; So set it.
  4280.     echo Connecting at \%s bps...\13     ; Tell the user.
  4281.     pause 2                              ; Give her a chance to read it.
  4282.     set terminal clear                   ; Clear screen.
  4283.     define \%1                           ; Clear argument.
  4284.     connect                              ; And start terminal emulation.
  4285.  
  4286.    Figure 1-3:  MS-Kermit Script for More Control of a Hayes 2400 bps Modem
  4287.  
  4288. -------------------------------------------------------------------------------
  4289.  
  4290. A  combination of DOS Batch and Kermit Script files is shown in Figures 1-4 and
  4291. 1-5 (see your DOS manual for an explanation of the batch  file  syntax).    The
  4292. purpose  is  to allow a user to say "SEND filename" at the DOS prompt.  The DOS
  4293. batch shell, SEND.BAT, and the login script, KX, are combined to login to a VAX
  4294. through a data switch, run VMS Kermit in server mode, transfer the file, submit
  4295. it to VMS Mail, delete the disk file, shut down the server and logout from  the
  4296. VAX,  and  report  the overall transfer status.  The user is asked to provide a
  4297. password interactively.
  4298.  
  4299. -------------------------------------------------------------------------------
  4300.  
  4301. File SEND.BAT, DOS batch program:
  4302.  
  4303.     echo off
  4304.     Rem Kermit, one-line file mailer, by Joe Doupnik.
  4305.     Rem Logon to VAX, run Kermit, Send user's file,
  4306.     Rem  post via MAIL, logout from VAX.
  4307.     if ".%2" == "." goto usage
  4308.     if exist %1 goto proceed
  4309.     echo No file to send!
  4310.     :usage
  4311.     echo Usage is SEND filename username
  4312.     goto done
  4313.     :proceed
  4314.     echo Logging onto the Vax ...
  4315.     kermit set disp q,take kx,send %1,pau,rem host mail %1 %2,pau 2,bye,
  4316.     if errorlevel 3 goto badrem
  4317.     if errorlevel 2 goto badrcv
  4318.     if errorlevel 1 goto badsnd
  4319.     echo File(s) "%1" has been mailed to %2.
  4320.     goto done
  4321.     :badrem
  4322.     echo Mail did not cooperate!
  4323.     :badrcv
  4324.     echo Receive failed!
  4325.     goto done
  4326.     :badsnd
  4327.     echo Send failed!
  4328.     goto done
  4329.     :done
  4330.     echo on
  4331.  
  4332.         Figure 1-4:  MS-DOS Batch File Invoking Kermit to Send VAX Mail
  4333.  
  4334. -------------------------------------------------------------------------------
  4335.  
  4336.  
  4337. 1.9. Initialization Files Revisited
  4338.  
  4339. At Columbia University, we have IBM 370-series mainframes running  VM/CMS,  and
  4340. VAX  and SUN systems running Unix.  All of these systems are accessible through
  4341. an IBM/Rolm (now Siemens/Rolm) voice/data CBX.  The IBM systems have  two  dif-
  4342. ferent  kinds  of  front ends, a COMTEN 3695 (similar to IBM 3705) for linemode
  4343. half-duplex  connections,  and  various  Series/1-style   protocol   converters
  4344. (including  the 7171 and 4994) for full-screen, full-duplex 3270 emulation, all
  4345. of which use various combinations of parity and other settings.    The  VAX  is
  4346. connected  directly  to  the  CBX,  whereas  the  SUNs are connected to the CBX
  4347. through Cisco Ethernet terminal servers.  Figure  1-6  shows  the  MSKERMIT.INI
  4348. file used at Columbia for automatic login to these systems.  It illustrates the
  4349. creative use of macros and scripts. Numerous  site-  and  system-dependent  key
  4350. definitions have been omitted.
  4351.  
  4352. A  bit  of  explanation might clarify some of this.  The IBM/Rolm CBX prompt is
  4353. "CALL, DISPLAY OR MODIFY?" and we respond with a CALL command for  the  desired
  4354. system  or front end, like CALL SIMB (IBM mainframe in full screen mode through
  4355. a 7171 protocol converter), CALL CUVMB (IBM mainframe in linemode  through  the
  4356. COMTEN),  CALL  CUNIXC (a VAX), or CALL CUNIXA (a SUN, through an Ethernet ter-
  4357. minal server).  When the initial call through the CBX is completed, the message
  4358. "CALL COMPLETE" appears, and then begins the interaction with the desired host,
  4359. front end, or terminal server, each of which has its own  set  of  prompts  and
  4360. responses.
  4361.  
  4362. To  connect  to  a  given  system, one types "do simb", "do cunixc" to invoke a
  4363. "connecting" macro.  Each of these, in turn, invokes the CBX macro to  navigate
  4364. through the CBX to the desired system.  If the CALL COMPLETE message is encoun-
  4365. tered, then further macros (3695, 7171, etc) are  used  to  get  past  any  as-
  4366. sociated  front  end (e.g. to tell the COMTEN which IBM mainframe is wanted, or
  4367. to tell the protocol converter what terminal to emulate), and then to login  on
  4368. the desired system, prompting on the screen for user ID and password.  Finally,
  4369. a macro like "vml" (VM linemode), "xed" (XEDIT, i.e. VM full screen), or  "dec"
  4370. (VAX  or  SUN)  is  executed to set the communication parameters for the system
  4371. just logged in to.  The key definitions that are shown in the "vml", "xed", and
  4372. "dec" macros assign the host's character deletion code (backspace or rubout) to
  4373.  
  4374. -------------------------------------------------------------------------------
  4375.  
  4376. File KX, Kermit script:
  4377.  
  4378.     Comment Login script for VAXA via Micom data PBX Switch.
  4379.     set input timeout quit
  4380.     set input echo off
  4381.     set display quiet
  4382.     output \13
  4383.     comment - "slowly." and "CLASS" are part of the switch's prompt.
  4384.     input 10 slowly.
  4385.     input 10 CLASS
  4386.     pause
  4387.     comment - Slowly tell switch "vaxa", wait for beep.
  4388.     output v
  4389.     output a
  4390.     output x
  4391.     output a
  4392.     output \13
  4393.     pause
  4394.     input 5 \7
  4395.     comment - Done with Switch, wake up the VAX and log in.
  4396.     pause
  4397.     output \13
  4398.     pause
  4399.     input 5 Username:
  4400.     set input timeout proceed
  4401.     output MYNAME\13
  4402.     input 2 Password:
  4403.     comment - Prompt ourselves, then get password from console.
  4404.     echo Enter password:
  4405.     output @con
  4406.     comment - Send a carriage return at the end of the password.
  4407.     output \13
  4408.     comment - Expect ESC Z from the VAX's Set Term/Inquire...
  4409.     comment - Respond ESC [ <query symbol> 6 c   (say we are VT102).
  4410.     comment - Note syntax for including question mark!
  4411.     input 15 \27Z
  4412.     output \27[\{63}6c
  4413.     comment Look for VMS dollar sign prompt
  4414.     input 15 $
  4415.     comment Start VMS Kermit and place it in server mode
  4416.     output kermit server\13
  4417.     comment - allow server's message to finish, "machine." appears twice.
  4418.     input 10 machine.
  4419.     input 10 machine.
  4420.     pause
  4421.  
  4422.       Figure 1-5:  MS-Kermit Script for Logging into VAX and Sending Mail
  4423.  
  4424. -------------------------------------------------------------------------------
  4425.  
  4426. -------------------------------------------------------------------------------
  4427.  
  4428.  
  4429. ; MS-Kermit 2.31, 2.32 Initialization File for the IBM PC, XT, AT, PS2, etc.
  4430. ; Christine Gianone, Vace Kundakci, Columbia University, December 1988
  4431. echo Columbia University IBM PC Kermit Initialization file...
  4432.  
  4433. ; User IDs on various systems.  Substitute your own IDs.
  4434. def \%c XYZCU          ; User ID for IBM mainframe
  4435. def \%u xyz            ; UNIX ID for UNIX
  4436.  
  4437. ; General settings
  4438. set warning on         ; Change this to "off" to allow overwriting of files.
  4439. set speed 9600         ; Use 9600 bits per second by default
  4440. set term vt102         ; Emulate a DEC VT-102 terminal
  4441. set term wrap on       ; Have Kermit wrap lines at column 80
  4442.  
  4443. ; Behavior of INPUT command in script programs
  4444. set input timeout quit ; Exit from script if input pattern not found
  4445. set input echo on      ; Echo characters that arrive during INPUT
  4446. set input case observe ; Match according to alphabetic case
  4447.  
  4448. ; Macros for connecting to different systems thru the IBM/Rolm CBX
  4449. def cuvmb  do cbx,o c cuvm\13,  i 10 PLETE,      do 3695, o vmb\13, do 4381
  4450. def simb   do cbx,o c simb\13,  i 10 PLETE, pau, do 7171, do 3270
  4451. def cunix  do cbx,o c cunix\13, i 10 PLETE, pau, do cuts, do unix
  4452. def cunixa def \%s cunixa,do cunix
  4453. def cunixb def \%s cunixb,do cunix
  4454. def cunixc do cbx,o c cunixc\13,i 10 PLETE, pau, out \13, do unix
  4455.  
  4456. ; Macros for navigating thru front end and login prompts
  4457. def cbx  do def,o \13,i 10 MODIFY?                          ; IBM/Rolm CBX
  4458. def 3695 i 5 ING CHARACTERS:\32\32                          ; COMTEN
  4459. def 7171 pau,cle,o \13,i 5 TERMINAL TYPE:\32,o vt-100\13    ; 7171 front end
  4460. def 4381 do vml,i 5 BREAK KEY,o \b,i 5 .\17,o LOG \%c\13,c  ; VM/CMS linemode
  4461. def 3270 pau,cle,o \13,o L \%c\13,do vmf,c                  ; VM/CMS fullsc.
  4462.  
  4463. ; CU Terminal Servers (cutsa, cutsb, etc)
  4464. def cuts set inp tim p,out \13,pau,set co 8,:loop,out \13,i 3 >,-
  4465. if suc goto ok,if cou goto loop,ech Failed,stop,:ok,out \%s\13,set inp tim q
  4466.  
  4467. ; UNIX login with speed matching
  4468. def unix set inp timeout proc,set count 8,-
  4469. :loop,i 5 login:\32,if suc goto ok,out \13,if count goto loop,-
  4470. echo Failed,stop,:ok,out \%u\13,do dec,set inp tim q,connect
  4471.  
  4472. ; Macros for interacting with different systems:
  4473. def vml do tty,set par m,set k \270 \8,  set k \3 \Kbreak    ; VM linemode
  4474. def vmf do def,set par e,set k \270 \8,  set k \3 \3,do simk ; VM fullscreen
  4475. def dec do def,set par n,set k \270 \127,set k \3 \3         ; DEC, SUN, etc
  4476. def def set tim of,set loc of,set hand non,set flow xon,do nosimk ; Default
  4477. def tty set tim on,set loc on,set hand xon,set flow non,do nosimk ; IBM TTY
  4478.  
  4479.             Figure 1-6:  An Advanced MS-Kermit Initialization File
  4480.  
  4481. -------------------------------------------------------------------------------
  4482.  
  4483. the AT's backarrow key.
  4484.  
  4485.  
  4486. 1.10. International Character Sets
  4487.  
  4488. MS-Kermit may be used on the IBM family and compatibles  for  interacting  with
  4489. host  computers  in  different  languages.  MS Kermit CONNECT mode has separate
  4490. translation mechanisms for  screen  and  keyboard.  Keyboard  translations  are
  4491. managed  through  the  SET KEY facility which maintains a table of defined keys
  4492. and their output values (single characters, strings, or Kermit keyboard verbs).
  4493. The  keyboard is normally read via the system Bios, but it may also be read via
  4494. DOS (with a loss of some key combinations) by saying SET KEY  OFF  (i.e.,  turn
  4495. off  Bios  reading). The keyboard can be modified rapidly by a group of SET KEY
  4496. commands placed in a macro. The host has no  direct  control  of  the  keyboard
  4497. translations;  the host thinks Kermit is a real Digital VT102/VT52 or Tektronix
  4498. 4010 terminal and those devices do not have redefinable keys.
  4499.  
  4500. Screen translation is accomplished in two places,  the  SET  TRANSLATION  INPUT
  4501. table  and  the  built-in  character sets.  SET TRANSLATION INPUT is a table of
  4502. received versus reported character codes, and it is enabled by SET  TRANSLATION
  4503. INPUT  ON.   The table is initially an identity which allows individual entries
  4504. to be modified as desired by the command
  4505.  
  4506.     SET TRANSLATION INPUT <received-code> <displayed-code>
  4507.  
  4508. Only characters destined for the screen as  text  or  cursor  control  (control
  4509. codes)  are  translated;  escape  sequences and transparent printing characters
  4510. bypass the SET TRANSLATION table.  The table is bypassed for printing to permit
  4511. binary  graphics  streams  to  be sent to the printer.  A character about to be
  4512. shown on the screen can be modified by selection of a character  set,  such  as
  4513. US-ASCII, UK-ASCII, ALTERNATE-ROM, or line drawing.
  4514.  
  4515. The SET TRANSLATION INPUT mechanism operates at the Kermit command level and is
  4516. available to macros, TAKE files, and hand  typed  control.    Host  control  is
  4517. available  only indirectly via the special macros TERMINALR and TERMINALS, dis-
  4518. cussed below, which may contain the SET TRANSLATION INPUT and other commands.
  4519.  
  4520. Character sets can be selected  either  by  the  Kermit  command  SET  TERMINAL
  4521. CHARACTER-SET (expressed by hand, in macros, or in Take files), or by host con-
  4522. trol of the terminal emulator via the escape sequences ESC ( char or ESC ) char
  4523. and  the  Control-O  and  Control-N  codes.    Thus, rapid changes of displayed
  4524. characters is available to the host and to the user through all  three  dynamic
  4525. pathways: macros, Take files, hand typing or received codes.
  4526.  
  4527. Version  2.32 of MS-Kermit also includes a new ability to operate right-to-left
  4528. during CONNECT mode, in order to interact with Hebrew or  Arabic  language  ap-
  4529. plications  on  the  host  computer.    The pertinent commands are SET TERMINAL
  4530. DIRECTION {LEFT-TO-RIGHT  |  RIGHT-TO-LEFT},  and  SET  TERMINAL  CHARACTER-SET
  4531. ALTERNATE-ROM.  The latter command makes these high bit characters available by
  4532. active user selection, or by reception of the escape  sequences  below  to  as-
  4533. sociate  them  with  one  of  the  two  VT102  character set pointers called G0
  4534. (normal) and G1 (alternate).  Arrival of Control-O selects the G0 set (default)
  4535. and Control-N the G1 set.
  4536.  
  4537. In  addition,  two  special  macro  names TERMINALR and TERMINALS have been set
  4538. aside, which can be invoked within the VT102 emulator  by  reception  from  the
  4539. host of the special escape sequences:
  4540.   ESC [ ? 34 h    (invokes macro TERMINALS)
  4541.   ESC [ ? 34 l    (lower case L, invokes macro TERMINALR)
  4542. and/or by using new keyboard "verbs" (not preassigned to keys):
  4543.   \Kterminals     (invokes macro TERMINALS)
  4544.   \Kterminalr     (invokes macro TERMINALR)
  4545.  
  4546. When  these  macros  are  invoked  within the terminal emulator and if they are
  4547. defined then CONNECT mode is exited and the macro is executed.    There  is  no
  4548. automatic  return to Connect mode at the completion of the macro.  If the macro
  4549. is not defined then CONNECT is not exited and nothing happens.  Initially  nei-
  4550. ther  macro  is  defined.   If a return to Connect mode is desired then include
  4551. CONNECT in the macro.  Any legal action is permitted in these macros, including
  4552. invoking other macros and Take files.
  4553.  
  4554. The  purpose of these two names and macros is to allow a host or the local user
  4555. to  interactively  select  two  local  operations  while  within  the  terminal
  4556. emulator,  such as changing language specific setups or other desirable things,
  4557. which are much more involved than an existing  keyboard  verb.    There  is  no
  4558. restriction  on  what  the  macros may do since Kermit is then operating not in
  4559. Connect mode but at the Kermit command prompt level, as it is for other macros.
  4560.  
  4561. The escape sequences above are a Kermit specific extensions of  Digital  Equip-
  4562. ment  Corporation's  private escape sequences to set and reset modes; hence the
  4563. letters S and R in the macro names.
  4564.  
  4565. One suggestion for employing SET TERM DIRECTION, SET TERM  CHARACTER,  and  the
  4566. macros  TERMINALR  and  TERMINALS  to  facilitate mixed Hebrew and English com-
  4567. munications is the simple Take file below:
  4568.  
  4569.     ; Define macros hebrew and english to do all the work
  4570.  
  4571.     def hebrew  set term dir right, set term char alt, hkey, comkey
  4572.     def english set term dir left, set term char us, set key clear, comkey
  4573.  
  4574.     ; Define host-reachable macros for on the fly changes while
  4575.     ; staying in the emulator
  4576.  
  4577.     def terminalr english, connect
  4578.     def terminals hebrew, connect
  4579.  
  4580.     ; Define IBM-PC F1 key as switch to English, F2 as switch to Hebrew.
  4581.     ; Done here to be remembered despite SET KEY CLEAR in macro English.
  4582.     ; F1 and F2 thus are user-level commands during emulation.
  4583.  
  4584.     def comkey set k \315 \Kterminalr,set k \316 \Kterminals
  4585.  
  4586.     ; Define SET KEYs for Hebrew keyboard layout via macro hkey
  4587.  
  4588.     def hkey set k \x27 \x2c,set k \x2c \x9a,set k . \x95,set k / \x2e,-
  4589.      set k \x3b \x93,set k \x60 \x3b,set k a \x99,set k b \x90, hkey1
  4590.     def hkey1 set k c \x81,set k d \x82,set k e \x97,set k f \x8b,-
  4591.      set k g \x92,set k h \x89,set k i \x8f,set k k \x87,hkey2
  4592.     def hkey2 set k l \x8c,set k m \x8a,set k m \x96,set k n \x8e,-
  4593.      set k o \x8d,set k p \x94,set k q /,set k r \x98,set k s \x83,hkey3
  4594.     def hkey3 set k t \x80,set k u \x85,set k v \x84,set k x \x91,-
  4595.      set k y \x88,set k z \x86
  4596.  
  4597. After executing this file, one may switch Connect mode language support between
  4598. Hebrew  (right  to  left, national display characters, similarly translate out-
  4599. going keyboard characters) and English by stating a single keyword at the  Ker-
  4600. mit  prompt, "Hebrew" or "English", or while within Connect mode by pushing the
  4601. F1 or F2 keys (in this example), or by reception of ESC [ ? 34 h or l from  the
  4602. host.    All  the  work is done from memory material and is essentially instan-
  4603. taneous.  Clearly, other languages can also utilize these tools.
  4604.  
  4605. IBM PCs or compatibles will normally have national characters installed in  the
  4606. upper  portion  of  the  character  set ROM, in positions 80H-9AH.  EGA systems
  4607. generally come with a program to load the appropriate  national  character  set
  4608. into  this  portion  of  memory,  such as HEBEGA for Hebrew.  Version 3.30 (and
  4609. later) of DOS supports the notion of "Code Page" for  PS/2  systems,  or  other
  4610. systems  with  EGA  or LCD adapters, described in Appendices B and C of the DOS
  4611. 3.30 reference manual.
  4612.  
  4613.  
  4614. 1.11. MS-Kermit Features for Different Systems
  4615.  
  4616. As noted early on, MS-Kermit was designed primarily for the IBM PC family,  and
  4617. later  adapted  to various non-IBM-compatible MS-DOS (and even non-MS-DOS) sys-
  4618. tems.  Some of these adaptations provide all the features of the  IBM  PC  ver-
  4619. sion,  others  provide only a subset, and still others may include features not
  4620. available on the IBM family.  These features are all  of  the  system-dependent
  4621. variety; the Kermit file transfer protocol should be implemented identically on
  4622. all versions of MS-Kermit.  The most obvious differences are  in  the  terminal
  4623. emulation  options  and  the keyboards.  Table 1-7 shows the terminal emulation
  4624. options for the systems presently supported by Kermit-MS, and Table 1-8,  shows
  4625. which  keys  are  used  for screen rollback on the various systems supported by
  4626. MS-Kermit.
  4627.  
  4628. -------------------------------------------------------------------------------
  4629.  
  4630.  
  4631.   System         EscChar   Capabilities Terminal Service
  4632.   ACT Apricot      ^]            K      VT52 ???
  4633.   DEC Rainbow      ^]      R   P K D    VT102 firmware
  4634.   DECmate/DOS      ^]            K      VT100
  4635.   Generic DOS      ^]            K      Depends on system
  4636.   Grid Compass     ^]            K      ???
  4637.   HP-110           ^]            K      Dumb terminal
  4638.   HP-150           ^]      R     K      HP-2623 firmware
  4639.   IBM PC family    ^]      R M P K D    H19,VT52,VT102,Tek emulation
  4640.   Intel 3xx        ^]            K      Uses real terminal
  4641.   NEC 9801         ^]        M P K D    VT102, Tektronix emulation
  4642.   NEC APC3         ^]      R M P K D    H19,VT52,VT102 emulation
  4643.   NEC APC          ^]      R   P K      VT100, ADM3A firmware
  4644.   Olivetti M24     ^]      R M P K D    Same as IBM PC
  4645.   Sanyo MBC55x     ^]      R M P K D    H19,VT52,VT102 emulation
  4646.   Wang PC          ^A            K      Wang firmware
  4647.   TI Pro           ^]        M P K      VT100/Tektronix
  4648.   Victor 9000      Alt-]     M P K D    H19,VT52,VT102 and/or Tek4010
  4649.   Zenith Z100      ^]            K      Heath-19 emulation
  4650.  
  4651.  R=Rollback, M=Modeline, P=Printer control, K=Key redefinition, D=screen Dump
  4652.  
  4653.                Table 1-7:  Kermit-MS Terminal Emulation Options
  4654.  
  4655. -------------------------------------------------------------------------------
  4656.  
  4657. -------------------------------------------------------------------------------
  4658.  
  4659. System    Screen Down   Line Down       Screen Up   Line Up
  4660. IBM PC    PgUp          Ctrl-PgUp       PgDn        Ctrl-PgDn
  4661. Rainbow   PrevScreen    Ctrl-PrevScreen NextScreen  Ctrl-NextScreen
  4662. HP-150    Prev          Shift-UpArrow   Next        Shift-DownArrow
  4663. NEC APC   Uparrow       Ctrl-UpArrow    DownArrow   Ctrl-DownArrow
  4664. NEC APC3  PgUp          Ctrl-PgUp       PgDn        Ctrl-PgDn
  4665. Sanyo 55x PgUp          Ctrl-RtArrow    PgDn        Ctrl-PgDn
  4666. The IBM PC also allows use of the Home key to get to the  top  of  its  display
  4667. memory and End key to get to the bottom, and the keypad minus (-) key to toggle
  4668. the mode line on and off.  The Rainbow uses Shift-Next-Screen  to  get  to  the
  4669. bottom  of  its  display memory, but provides no key for moving directly to the
  4670. top.
  4671.  
  4672.                    Table 1-8:  Kermit-MS Screen Scroll Keys
  4673.  
  4674. -------------------------------------------------------------------------------
  4675.  
  4676. Another difference is the default communication port, the number of  communica-
  4677. tion  ports  supported,  and the names given to them.  For instance, the IBM PC
  4678. family supports COM1 and COM2, and uses COM1 by default.  MS-Kermit may be per-
  4679. suaded  to  support higher-numbered IBM ports using the method outlined in sec-
  4680. tion 1.18.3.  For remote operation, IBM's name for the console is  CON,  so  if
  4681. you CTTY COM1, you do CTTY CON to put the PC back to normal.
  4682.  
  4683.  
  4684. The DEC Rainbow
  4685.  
  4686. The  DEC Rainbow version of MS-Kermit uses the built-in VT102 terminal firmware
  4687. and setup modes, and can operate at speeds up to 9600 baud.   It  has  no  25th
  4688. screen  line,  and  therefore  no Kermit mode line during CONNECT.  It supports
  4689. only the Rainbow's single communication port, and not the printer port, so  SET
  4690. PORT  for the Rainbow is not implemented (but of course the printer may be used
  4691. for printing.)  The Rainbow may be put in remote mode by CTTY AUX, and returned
  4692. to  normal with CTTY SCRN.  The Rainbow supports several SET TERMINAL commands:
  4693. VT102, VT52, and ROLL.
  4694.  
  4695. The keypad and cursor keys all work properly in VT102 and VT52 modes and in ap-
  4696. plication  as  well  as  native  states  (they never had in previous versions).
  4697. Newline mode is activated for received characters (LF ==> CR/LF).  Screen  roll
  4698. back  is  almost 11 screenfuls.  Table 1-9 shows the verb names and default key
  4699. assignments for the Rainbow.  On the main typewriter keyboard the shifted comma
  4700. and period are converted to special keys available for Set Key assignment with-
  4701. out impacting the normal unshifted ASCII actions; Shift Lock has no  effect  on
  4702. these keys.
  4703.  
  4704. -------------------------------------------------------------------------------
  4705.  
  4706.  
  4707.     Rainbow Key           Verb Name      Operation
  4708.  
  4709.     PF1                   \Kpf1,\Kgold   Keypad function key
  4710.     PF2..PF4              \Kpf2..\Kpf4   Keypad function keys
  4711.     keypad 0..9           \Kkp0..\Kkp9   Keypad digit keys
  4712.     keypad -              \Kkpminus      Keypad minus key
  4713.     keypad ,              \Kkpcoma       Keypad commma
  4714.     keypad .              \Kkpdot        Keypad dot (period) key
  4715.     keypad Enter          \Kkpenter      Keypad Enter key
  4716.  
  4717.     up arrow              \Kuparr        Cursor keys
  4718.     down arrow            \Kdnarr
  4719.     left arrow            \Klfarr
  4720.     right arrow           \Krtarr
  4721.     Shift Prev Screen     \Khome         Rewind to start of screen buffer
  4722.     Shift Next Screen     \Kend          Unwind to end of screen buffer
  4723.     Ctrl Prev screen      \Kupone        Backup one screen line
  4724.     Ctrl Next screen      \Kdnone        Advance one screen line
  4725.     Prev screen           \Kupscn        Backup one screen
  4726.     Next screen           \Kdnscn        Advance one screen
  4727.     Print Screen          \Kprtscr       Copy screen to printer
  4728.     Ctrl Print Screen     \Ktoggle_prn   Toggle echoing screen to printer
  4729.                                           (printer failure resets toggle)
  4730.     Do                    \Kdump         Copy screen to file (KERMIT.SCN)
  4731.     Break                 \Kbreak        Send a BREAK
  4732.     Shift Break           \Klbreak       Send a Long BREAK
  4733.     Main Screen           \KDOS          Push to DOS
  4734.     Help                  \Khelp         Show Connect mode help menu
  4735.     Exit                  \Kexit         Exit Connect mode
  4736.     *                     \Knull         send a null out the serial port
  4737.     *                     \Khangup       hangup phone by dropping DTR, RTS
  4738.     *                     \Klogon        resume logging, if active
  4739.     *                     \Klogof        suspend logging
  4740.     *                     \Kstatus       display status table
  4741.  
  4742.     * (verbs not pre-assigned to keys)
  4743.  
  4744.  
  4745.                 Table 1-9:  Kermit-MS Verbs for the DEC Rainbow
  4746.  
  4747. -------------------------------------------------------------------------------
  4748.  
  4749.  
  4750. The DECmate II
  4751.  
  4752. MS-Kermit for the DECmate II with the XPU option is somewhat similar to Rainbow
  4753. Kermit.  It uses built-in terminal VT100 firmware  and  setup  modes  and  baud
  4754. rates  up  to  9600  on the single communication port.  The printer port is not
  4755. available for communications in this version.  There is no mode line, but other
  4756. connect-mode escapes are supported, including sending BREAK.  Disks A through I
  4757. are supported, and the floppy disk format is compatible with the Rainbow.   DEC
  4758. utilities are available for file conversion between DOS and WPS-8 files.
  4759.  
  4760.  
  4761. The NEC APC3
  4762.  
  4763. The NEC APC3 version of MS-Kermit assumes that the ANSI.SYS driver has been in-
  4764. stalled and that a color monitor is being used; the color  graphics  option  is
  4765. not  used  by  Kermit.  Although the display should be entirely sensible with a
  4766. monochrome system, it has not been tested.  Differences from the IBM PC version
  4767. include:
  4768.  
  4769. SET BAUD: The useful baud rates supported range from 300 to 9600.
  4770.  
  4771. SET  PORT:  The  available  ports  are 1, 2, 3, or their equivalents AUX, AUX2,
  4772. AUX3.
  4773.  
  4774. SET TERMINAL COLOR: Instead of specifying colors by  number,  the  words  BLUE,
  4775. RED, MAGENTA, GREEN, CYAN, YELLOW, or WHITE are appropriate.  This is the color
  4776. of the text in connect mode; background colors are not available.    Monochrome
  4777. monitors will respond with display changing from most dim to most bright if the
  4778. colors are specified in the order given.
  4779.  
  4780. SET TERMINAL KEYCLICK: Not implemented in Kermit; use the NEC provided command.
  4781.  
  4782. SET TERMINAL SCREEN-BACKGROUND: Not implemented.
  4783.  
  4784. During terminal emulation, screen scroll is handled by the PgUp and PgDn  keys.
  4785. If  used  in combination with the Ctrl key, the display moves but one line.  If
  4786. used in combination with the Fnc key, the display scrolls to  the  end  of  the
  4787. buffer.    The  Fnc-INS  combination toggles the mode line on/off.  The Fnc-DEL
  4788. combination toggles the terminal emulation type.    The  Fnc-Break  combination
  4789. resets  the emulator.  The Help key pulls down the connect mode menu.  The ANSI
  4790. escape sequence for disable/enable cursor is implemented.
  4791.  
  4792.  
  4793. 1.12. Compatibility with Older Versions of MS-DOS Kermit
  4794.  
  4795. The last monolithic (single source file) release of  MS-DOS  Kermit  was  1.20.
  4796. Meanwhile, implementations based on versions of that vintage will have at least
  4797. the following incompatibilies from the version described here:
  4798.  
  4799.    - "RECEIVE filespec" is used instead of "GET filespec".   There  is  no
  4800.      GET  command  in older versions, and no way to specify a new name for
  4801.      an incoming file.
  4802.    - No LOCAL or REMOTE commands.
  4803.    - No 8th-bit prefixing, repeat counts, CRCs or 2-character checksums.
  4804.    - No TAKE or initialization files.
  4805.    - No command macros or command line arguments.
  4806.    - No terminal session logging.
  4807.  
  4808. and others, depending on the specific version.
  4809.  
  4810. Incompatibilities between 2.29 and later releases include:
  4811.  
  4812.    - LOCAL command has been removed from 2.30 and later.
  4813.    - CLEAR command now means clear serial port buffer rather than key  and
  4814.      macro definitions.  Key and macro definition string space is now gar-
  4815.      bage collected, so a CLEAR command for them is no longer necessary.
  4816.    - CLRINP command is gone (replaced by CLEAR).
  4817.    - Numbers of the form \nnn default to decimal rather than octal.
  4818.    - Status of Default Disk is now shown as default disk and path.
  4819.    - LOG  filespec  replaced  by  LOG  SESSION  filespec  and  LOG  PACKET
  4820.      filespec.
  4821.    - SET  KEY  and SHOW KEY commands use different key identifications and
  4822.      syntax:
  4823.  
  4824. MS-Kermit no longer understands keycap names such as F1 and  BACKSPACE  because
  4825. the  codes are now highly dependent on individual keyboards, software, and com-
  4826. puters.  Also, not every key press  combination  is  supported  by  the  system
  4827. software  and  key  codes do depend on the keyboard in use.  Thus, the SHOW KEY
  4828. command is normally used to obtain codes for keys on  your  system.    In  most
  4829. cases,  defining one key also redefines all other keys sending the same charac-
  4830. ter.  This is a side effect of  not  knowing  the  physical  details  of  every
  4831. keyboard.    However,  efforts  have been made to recognize many such "aliased"
  4832. keys and to generate unique identifications for each. Special keys, such as F1,
  4833. F2  and others which do not send an ASCII code are usually unique and are iden-
  4834. tified by scan codes.
  4835.  
  4836. Previous versions of MS Kermit used a different key coding  algorithm  and  not
  4837. all  old  codes  map to the expected keys.  However, Kermit does attempt to use
  4838. the older SET KEY syntax properly as much as possible.  The  older  syntax  re-
  4839. quired  the  keyword SCAN followed by a number WITHOUT the BACKSLASH.  The cur-
  4840. rent MS Kermit uses decimal as the default number base  and  previous  versions
  4841. used  octal  in  certain commands.  So, when Kermit senses an old style SET KEY
  4842. command it converts the number, displays the new format  and  gives  a  warning
  4843. message.  It is best to make a new style SET KEY file.
  4844.  
  4845.  
  4846. 1.13. What's Missing
  4847.  
  4848. Kermit-MS  has  plenty of room for improvement.  Missing features (which may be
  4849. added in future releases) include:
  4850.  
  4851.    - Sliding window transport protocol.
  4852.    - Default filetype for TAKE command files.
  4853.    - Passing paramaters in TAKE command, like in DO command.
  4854.    - A way to send files with their full path names.
  4855.    - A way to play back session logs directly from disk to screen.
  4856.    - Trapping of carrier loss during CONNECT or file transfer.
  4857.    - A better built-in help facility.
  4858.    - A way to dump or print Tektronix graphics screens.
  4859.  
  4860.  
  4861. 1.14. Installation of Kermit-MS
  4862.  
  4863. If you already have Kermit on your PC, you can use it to obtain new versions of
  4864. Kermit-MS  when  they appear on the central system at your site.  If you do not
  4865. have Kermit or any other reliable file capture facility on your PC, you can or-
  4866. der  a  Kermit  diskette  from Columbia (write to Kermit Distribution, Columbia
  4867. University Center for Computing Activities, 612 West 115th Street, New York, NY
  4868. 10025,  USA,  for  information), or from any of a number of user groups or dis-
  4869. kette services.  If you don't have Kermit already, and absolutely can't  get  a
  4870. Kermit  diskette,  but  have  access to another computer that has a copy of the
  4871. MS-DOS Kermit program (usually in ".BOO" format, explained  below),  there  are
  4872. two recommended methods for getting it onto your PC:
  4873.  
  4874.    1. Use another file capture facility to get it.
  4875.  
  4876.    2. Type  in and run the "baby Kermit" program (72 lines) from chapter 7
  4877.       of the Kermit book.
  4878.  
  4879. The first method involves either "raw capture" (no error checking), or else use
  4880. of  another protocol, such as Xmodem, which, like Kermit, requires a program to
  4881. execute the same protocol on both ends of the connection.
  4882.  
  4883. Raw capture generally involves "typing" the file on the  other  computer,  with
  4884. your  PC  taking the place of the terminal, and rather than displaying the file
  4885. on the screen as it's being typed, your PC is storing it on the disk.  This  is
  4886. a  tricky  process, however, because data can easily be lost or corrupted.  For
  4887. instance, you could write a very short BASIC program to capture a file in  this
  4888. way,  but  it  could probably not keep up -- even at low baud rates -- with the
  4889. transmission speed unless you included the tricky serial port  BASIC  commands.
  4890. The  DOS  command COPY COM1 filename command has the same speed problem, and it
  4891. stops only when it receives a Control-Z character from the other computer.
  4892.  
  4893. If the other computer has Kermit on it -- which is likely, since this is  prob-
  4894. ably  the  reason you want to get Kermit onto your PC -- you should type in the
  4895. receive-only BASIC Kermit program listed on pp.186-188 of the Kermit book,  and
  4896. then  use  it  in  conjunction with the other computer's Kermit to transfer the
  4897. file.  Make sure to set a long enough delay on the other computer to give your-
  4898. self  time to escape back to the PC and start up the "baby Kermit" before pack-
  4899. ets start to arrive, otherwise you'll probably get fatal DOS i/o errors.
  4900.  
  4901. Note that  Kermit  programs  are  often  distributed  under  names  other  than
  4902. "Kermit".    The  Columbia  Kermit  program library contains hundreds of Kermit
  4903. programs, which must be given unique names.  MS-DOS Kermit for the IBM PC,  for
  4904. instance,  is called MSVIBM.  Once you have this program in .EXE format on your
  4905. disk, you probably should rename it to  KERMIT.EXE,  because  the  distribution
  4906. name is harder to remember (and type).
  4907.  
  4908. You  will  probably  also  want  to create an MS-Kermit initialization file.  A
  4909. sample is distributed with MS-Kermit as MSVIBM.INI.  This should be tailored to
  4910. your  requirements,  and  then renamed to MSKERMIT.INI, and stored where Kermit
  4911. can find it (in the current directory or any directory in your DOS PATH).
  4912.  
  4913.  
  4914. ".BOO Files"
  4915.  
  4916. MS-Kermit (and many other Kermit programs) are often distributed using  a  spe-
  4917. cial encoding called "boo" (short for "bootstrap") format, developed especially
  4918. for distribution of MS-Kermit over networks and communication lines.  MS-Kermit
  4919. has  grown  to  have  so  many features that the binary program image (the .EXE
  4920. file) has become quite large.  But binary files are  generally  not  compatible
  4921. with  the  common  labeled  tape formats (e.g. ANSI D), electronic mail, or raw
  4922. downloading -- the methods most commonly used for Kermit distribution.
  4923.  
  4924. A common practice is to encode .EXE  and  other  binary  files  into  printable
  4925. characters,  such  as hexadecimal digits, for transportability.  A simple "hex"
  4926. encoding results in two characters per 8-bit  binary  byte,  plus  CRLFs  added
  4927. every  80  (or  less)  hex  characters  to  allow  the  file  to  pass  through
  4928. card-oriented links.  A hex file is therefore more than twice as large  as  the
  4929. original binary file.
  4930.  
  4931. A  .BOO file is a more compact, but somewhat more complicated, encoding.  Every
  4932. three binary bytes (24 bits) are split up into four 6-bit bytes with 48  (ASCII
  4933. character  "0")  added to each, resulting in four ASCII characters ranging from
  4934. "0" (ASCII 48) to "o" (ASCII 111), with CRLFs added at  or  near  "column  76".
  4935. The  resulting file size would therefore be about 4/3 the .EXE file size.  This
  4936. is still quite large, so .BOO  files  also  compress  consecutive  null  (zero)
  4937. bytes.    Up to 78 consecutive nulls are compressed into two characters.  Tilde
  4938. ("~") is the null-compression lead-in, and the  following  character  indicates
  4939. how many nulls are represented (subtract 48 from this character's ASCII value).
  4940. For instance "~A" means 17 consecutive nulls; "~~" means 78 of them.   Repeated
  4941. nulls are very common in .EXE files.
  4942.  
  4943. 4-for-3 encoding combined with null compression reduces the size of the encoded
  4944. file to approximately the same size as the original .EXE  file,  and  sometimes
  4945. even smaller.  The first line of a .BOO file is the name (in plain text) of the
  4946. original file.  Here's what the first few lines of a  typical  .BOO  file  look
  4947. like:
  4948.  
  4949.   MSVIBM.EXE
  4950.   CEYP0Id05@0P~3oomo2Y01FWeP8@007P000040HB4001`W~28bL005\W~2JBP00722V0ZHPYP:
  4951.   \8:H2]R2V0[`PYP:68>H2S23V0YHPiP:Xg800;Qd~2UWD006Yg~2Ogl009]o~2L8000;20~~~~
  4952.   ~~~~~~~:R2H008TV?P761T410<H6@P40j4l6RRH0083l17@PP?`1M@?YSP20o0Ee0nUD0h3l
  4953.   1WD3jO@3]0VjW03=8L?X4`N0o01h1\H6~20l>0i7n0o1]e7[@2\PO=8LH60@00Raj>04^97Xh0
  4954.  
  4955.  
  4956. Programs for Handling .BOO Files
  4957.  
  4958. Kermit Distribution includes several useful .BOO-file programs:
  4959.  
  4960. MSBPCT.BAS      This  Microsoft  BASIC  program  can be used on any PC that has
  4961.                 BASIC to decode a .BOO file into an .EXE file.  It's  about  50
  4962.                 lines line, so it can be typed in.
  4963.  
  4964. MSBPCT.BOO      BASIC  programs  run  rather slowly, so .BOO-file decoders have
  4965.                 also  been  written  in  high-level  languages  like   C.   The
  4966.                 MSBPCT.EXE  file that was produced by compiling MSBPCT.C is en-
  4967.                 coded  into  MSBPCT.BOO,  which  can  be  decoded   back   into
  4968.                 MSBPCT.EXE  using MSBPCT.BAS.  Once you've done that, you don't
  4969.                 need to run the slow BASIC version any more, which is a  bless-
  4970.                 ing,  because  the MS-Kermit .BOO file takes up to half an hour
  4971.                 to decode using the BASIC version (depending  on  the  system),
  4972.                 but only seconds using MSBPCT.EXE.
  4973.  
  4974. MSBPCT.*        There  are  .BOO-file  decoders written in other languages too,
  4975.                 like assembler, Turbo Pascal, Fortran, etc.   Take  your  pick.
  4976.                 They all do the same thing.
  4977.  
  4978. MSBMKB.*        This is the program for encoding an .EXE file into a .BOO file.
  4979.                 It is written in C, compiled, and translated (by  itself)  into
  4980.                 .BOO  format,  suitable for decoding back into .EXE form by any
  4981.                 of the MSBPCT programs.  Also  in  other  languages,  including
  4982.                 Fortran and Turbo Pascal.
  4983.  
  4984. MSBHEX.* are C programs for producing and decoding straight hex files.
  4985.  
  4986.  
  4987. 1.15. Program Organization
  4988.  
  4989. Kermit-MS  version  2 is composed of separate assembler source files, assembled
  4990. separately, and linked together.  The modules are:
  4991.  
  4992. System/Device Independent:
  4993.  
  4994. MSSKER.ASM      Main program
  4995. MSSSEN.ASM      File sender
  4996. MSSRCV.ASM      File receiver
  4997. MSSSER.ASM      Server operation
  4998. MSSFIL.ASM      File i/o
  4999. MSSCMD.ASM      Command parser
  5000. MSSTER.ASM      CONNECT command
  5001. MSSCOM.ASM      Packet reader and sender
  5002. MSSSET.ASM      SET, SHOW, and STATUS commands
  5003. MSSSCP.ASM      Script CLEAR, ECHO, INPUT, OUTPUT, PAUSE, TRANSMIT commands
  5004. MSSFIN.ASM      Dummy module for the end of the data segment;  must  be  linked
  5005.                 LAST.
  5006. MSSDEF.H        Data structure definitions and equates
  5007.  
  5008. System/Device Dependent:
  5009.  
  5010. MSGxxx.ASM      System-dependent graphics terminal for system xxx
  5011. MSUxxx.ASM      System-dependent keyboard translator for system xxx
  5012. MSXxxx.ASM      System-dependent code for system xxx
  5013. MSYxxx.ASM      Terminal emulation for system xxx
  5014. MSZxxx.ASM      More terminal emulation for system xxx
  5015.  
  5016. The  xxx is replaced by a 3-letter code for the particular system, e.g. IBM for
  5017. the IBM PC family, RB1 for the Rainbow-100, etc.
  5018.  
  5019. The modular organization allows easier modification  of  the  program,  quicker
  5020. transfer  of modified portions from system-to-system.  The modules are designed
  5021. to be well-defined and self-contained, such that they can be  easily  replaced.
  5022. For instance, someone who prefers windows and mice to typing commands should be
  5023. able to replace the command parsing module without having to  worry  about  the
  5024. effect on the other modules.
  5025.  
  5026. To  assemble  any  of  the Kermit modules, file MSSDEF.H must be on the default
  5027. disk.
  5028.  
  5029. All the Kermit implementations require  the  modules  MSSCMD,  MSSCOM,  MSSFIL,
  5030. MSSKER, MSSRCV, MSSSCP, MSSSEN, MSSSER, MSSSET, MSSTER, MSSFIN.  MSSFIN must be
  5031. linked last.
  5032.  
  5033. Each particular implementation requires at least an MSXxxx module,  usually  an
  5034. MSUxxx  module,  and,  if  it  is doing terminal emulation in software, also an
  5035. MSYxxx and possible also an MSZxxx module, and for graphics terminal emulation,
  5036. also  an  MSGxxx module.  See the batch or make files from the source distribu-
  5037. tion for details of exactly which modules are required  for  a  particular  im-
  5038. plementation.
  5039.  
  5040. Once  all  the  required  object  modules exist, they may be linked together to
  5041. produce a Kermit program.  For example, on the IBM PC:
  5042.  
  5043.   A>link
  5044.  
  5045.      Microsoft Object Linker V2.00
  5046.   (C) Copyright 1982 by Microsoft Inc.
  5047.  
  5048.   Object Modules [.OBJ]: msscmd+msscom+mssfil+mssker+mssrcv+mssscp+msssen+
  5049.   mssser+mssset+msster+msgibm+msuibm+msxibm+msyibm+mszibm+mssfin
  5050.   Run File [MSSCMD.EXE]: kermit
  5051.   List File [NUL.MAP]:;
  5052.  
  5053.       A>
  5054.  
  5055. Warning: old versions of MASM may not be able to assemble several of the  large
  5056. files  now present in Kermit-MS.  The solution is to acquire Microsoft MASM 4.0
  5057. or later.
  5058.  
  5059.  
  5060. 1.16. Bringing Kermit to New Systems
  5061.  
  5062. You can bring Kermit-MS to MS-DOS systems that are not explicitly supported  in
  5063. one of two ways -- attempt to run the "generic" MS-DOS Kermit on it, or add ex-
  5064. plicit code to support your system.
  5065.  
  5066. To get started with Kermit on a new system, try running "generic"  MS-DOS  Ker-
  5067. mit;  in  many  cases, it will run as is.  The generic version accomplishes all
  5068. its port and console i/o through DOS calls, and during terminal connection does
  5069. not  attempt  to  emulate  any particular kind of terminal.  In some cases, the
  5070. generic version may still require some fiddling to run on a new system; for in-
  5071. stance,  different systems refer to their communication ports in different ways
  5072. -- COM1, J1, AUX, etc.  The SET PORT command allows you  to  specify  the  port
  5073. using any of these device names, or using DOS file handles -- keep trying until
  5074. you find the one that works.  Generic MS-DOS Kermit will probably run no faster
  5075. than 1200 baud, and it only works with DOS 2.0 or later.
  5076.  
  5077. If  you  want  to  write code to explicitly support a new system, first call or
  5078. write Kermit Distribution at Columbia to make sure no one else is already doing
  5079. the same work.  If you're the first, then begin by reading the file MSXAAA.DOC,
  5080. provided with the MS-DOS Kermit sources in the Kermit distribution, which is  a
  5081. guide to the system dependent modules of Kermit-MS.  Then create new MSUxxx.ASM
  5082. and MSXxxx.ASM modules, and, if your version is also doing  terminal  emulation
  5083. in  software, also an MSY and possibly an MSZ module patterned after those that
  5084. have been written for other systems.
  5085. 1.17. Kermit-MS VT102 Terminal Emulator Technical Summary
  5086.  
  5087.  
  5088. 1.17.1. Treatment of Inbound Characters During Terminal Emulation
  5089.  
  5090. The following sections summarize the Kermit-MS keyboard  and  screen  operation
  5091. during emulation of H19, VT52, and VT102 terminals, prinicipally for the IBM PC
  5092. but also used by the NEC APC3, Victor 9000, and Sanyo 55x systems.
  5093.  
  5094. Many things can happen to a character that arrives at  the  communication  port
  5095. before  you  see  it.  The sequence of events for version 2.32 is summarized in
  5096. the following picture.  2.31 is similar except for no national characters.
  5097.  
  5098. -------------------------------------------------------------------------------
  5099.                 character from serial port or network
  5100.                                 |
  5101.                                 v
  5102.                         NUL: discard unless DEBUG is ON
  5103.                         DEL: discard unless DEBUG is ON or doing Tektronix
  5104.                                 |
  5105.                         character available to rest of Kermit
  5106.                                 |
  5107.                                 v
  5108.         TERMINAL NONE   <-------*-------*---> to packet reader
  5109.         DISPLAY 8-BIT?          |       |
  5110.         Yes     No              v       v
  5111.         |       |               |       |
  5112.         |       remove 8-th bit |       Script routines.
  5113.         |       |               |       remove parity bit, if parity used.
  5114.         ---------               |       apply SET TRANSLATION INPUT table,
  5115.         |                       |        if active.
  5116.         apply SET TRANSLATION   |       |
  5117.         INPUT, if active        |       LOG SESSION active?
  5118.         |                       |       No      Yes
  5119.         copy char to printer?   |       |       |
  5120.         No      Yes             |       |       DEBUG ON or DISPLAY 8-BIT?
  5121.         |       |               |       |       Yes     No
  5122.         |       print char      |       |       |       |
  5123.         |       via DOS         |       |       |       remove 8-th bit
  5124.         |       |               |       |       |       |
  5125.         ---------               |       |       ---------
  5126.         |                       |       |           |
  5127.         log char if             |       |           |
  5128.         LOG SESSION active.     |       |           |--> log character
  5129.         |                       |       v           v
  5130.         v                       |       -------------
  5131.     DEBUG ON?                   |               |
  5132.     No    Yes                   |       DISPLAY 8-BIT?
  5133.     |     |                     |       Yes     No
  5134.     |   show chars, with                |       |       |
  5135.     |   tilde/caret modifiers   |       |       remove 8-th bit
  5136.     |     |                     |       |       |
  5137.     |   Exit                    |       v       v
  5138.     |                           |       -------------> character to scripts
  5139.     display char via DOS        |
  5140.     Exit                        |
  5141.                                 v
  5142.                         VT102 terminal emulator
  5143.                                 |
  5144.                            SET DEBUG ON?
  5145.                                 No      Yes --> display characters:
  5146.                                 |               show leading tilde if bit 8
  5147.                                 |               set; for lower 7 bits show
  5148.                                 |               caret-char if Control code.
  5149.                                 |               |
  5150.                                 |               Exit.
  5151.                                 v
  5152.                 Printing Transparently? (ESC [ 4/5 i)
  5153.                 No              Yes
  5154.                 |               |
  5155.                 |               log character if LOG SESSION is active,
  5156.                 |               send char to printer but not to screen.
  5157.                 |               |
  5158.                 |               Exit.
  5159.                 v
  5160.         SET DISPLAY 8-BIT?
  5161.         Yes             No
  5162.         |               |
  5163.         |       remove 8-th bit of character
  5164.         |               |
  5165.         v               v
  5166.         -----------------
  5167.                 |
  5168.                 v
  5169.         Control character?
  5170.         Yes             No
  5171.         |               |
  5172.         |               Doing escape sequence?
  5173.         |               No              Yes
  5174.         |               |               |
  5175.         v               v               |
  5176.         -----------------               |
  5177.                 |                       |
  5178.                 v                       |
  5179.         do SET TRANSLATION INPUT,       |
  5180.         if active.                      |
  5181.         |                               v
  5182.         ---------------------------------
  5183.                         |
  5184.                         v
  5185.                  NUL or DEL character?
  5186.                         No      Yes --> Exit (discard)
  5187.                         |
  5188.                         |
  5189.                 log character if LOG SESSION is active.
  5190.                         |
  5191.                 Control character?
  5192.                 Yes             No
  5193.                 |               |
  5194.           do control ops        map character according to
  5195.                 |               active character-set pointer. (See below)
  5196.                 Exit            |
  5197.                                 display character on screen
  5198.                                 (with double width/height, if req'd).
  5199.                                 |
  5200.                                 print character via DOS if
  5201.                                 Controller Print is active (ESC [ ? 4/5 i)
  5202.                                 or if Kermit copy screen to printer active.
  5203.                                 |
  5204.                                 v
  5205.                                 Exit
  5206. -------------------------------------------------------------------------------
  5207.  
  5208. Updating of the cursor position is automatic and can be influenced by the  Ker-
  5209. mit  command SET TERMINAL DIRECTION {RIGHT-TO-LEFT | LEFT-TO-RIGHT}.  As a con-
  5210. venience, the keyboard left and right arrow  keys  are  interchanged  when  the
  5211. writing  direction  is reversed; thus, the right arrow always requests the host
  5212. to move the cursor to the visual right.
  5213.  
  5214. The active character-set pointer is determined by two conditions:
  5215.  
  5216.    1. The VT102 maintains two character set pointers (selectors),  G0  and
  5217.       G1.    G0 is the default pointer. Reception of Control-O selects the
  5218.       G0 pointer, Control-N selects the G1 pointer.
  5219.  
  5220.    2. Which  character  set:   US-ASCII,   UK-ASCII,   ALTERNATE-ROM,   or
  5221.       line-drawing,  has been assigned to G0 and G1 pointers.  The command
  5222.       SET CHARACTER-SET {US-ASCII, UK-ASCII, ALTERNATE-ROM}  assigns  that
  5223.       set to the G0 AND G1 pointers. Similarly, the host can assign any of
  5224.       the four sets to either G0 OR G1 via the escape sequences ESC ( char
  5225.       or ESC ) char, respectively, as summarized below:
  5226.  
  5227.     ESC ( A     G0 points to UK symbols (ASCII with Pound Sterling sign)
  5228.     ESC ) A     G1 points to UK symbols
  5229.     ESC ( B     G0 points to ASCII symbols (ASCII with US pound sign #)
  5230.     ESC ) B     G1 points to ASCII symbols
  5231.     ESC ( 0     G0 points to special (line drawing) graphics
  5232.     ESC ) 0     G1 points to special (line drawing) graphics
  5233.     ESC ( 1     G0 points to ALTERNATE-ROM national characters
  5234.     ESC ) 1     G1 points to ALTERNATE-ROM national characters
  5235.     ESC ( 2     G0 points to special (line drawing) graphics
  5236.     ESC ) 2     G1 points to special (line drawing) graphics
  5237.  
  5238. All character sets produce
  5239.  
  5240.     !"  pound-sign  $%&'()*+,-./0123456789:;<=>?
  5241.     @ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_
  5242.  
  5243. The  lower  case field, `ab..yz{|}~ changes to line drawing or national charac-
  5244. ters, depending on the character set. National characters replace the character
  5245. codes  60h  to  7Ah (accent grave, lower case a-z) with codes 80h to 9Ah; lower
  5246. case a becomes umlated u, etc in standard IBM display adapters.
  5247.  
  5248. DOS Code Page support
  5249.  
  5250. Code Pages are sets of translation tables maintained within DOS to support  na-
  5251. tional languages. They affect the characters reported by the keyboard and those
  5252. displayed on the screen and printer. Code Page  support  is  loaded  as  device
  5253. driver  information  in CONFIG.SYS and activated by DOS programs NLSFUNC, CHCP,
  5254. KEYB, and MODE, at least under PC DOS 3.30.  An EGA  adapter  is  required  for
  5255. screen  support; similarly, only IBM printers are discussed.  Making Code Pages
  5256. operate is not exactly easy, and there have been rumors that MS-DOS Code  Pages
  5257. from  various  vendors  are  not  bug free.  However, the goal is an ability to
  5258. change translations for screen, keyboard, and printer by DOS commands.
  5259.  
  5260. Since Code Pages are the province of DOS it is clear  that  operations  at  the
  5261. Bios  or hardware levels will not experience Code Pages.  Kermit uniformly uses
  5262. DOS for printer output.  Kermit CONNECT mode keyboard reading is normally  done
  5263. via  the  Bios, unless SET KEY OFF has been stated.  Kermit CONNECT mode Screen
  5264. reading and writing is done  via  both  the  Bios  and  the  hardware  for  the
  5265. VT102/VT52/Tek4010  emulators,  but  the  terminal  type of NONE uses only DOS.
  5266. Thus, full Code Page support is available in Kermit by stating SET KEY OFF (use
  5267. DOS)  and  SET  TERMINAL  NONE  (use  DOS).  Outside of CONNECT mode all Kermit
  5268. screen and keyboard input and output is done through DOS.
  5269. 1.17.2. Keyboard Layout and Characters Sent
  5270.  
  5271. Here is how the keypad functions are assigned  to  the  IBM  keyboard  function
  5272. keys.  You may change them by using the SET KEY command to define a desired key
  5273. as the appropriate Kermit action verb; use SET KEY without a definition to  un-
  5274. define a key.  Names of appropriate verbs are also shown for use in the Set Key
  5275. command, such as
  5276.  
  5277.     Set Key \2352 \Kbreak           (IBM Alt-B assigned to verb BREAK)
  5278.  
  5279. Verb names are system dependent, use ? in the Set Key  definition  part  for  a
  5280. list  of local verbs.  IBM PC verbs are listed in Table 1-6; IBM key values are
  5281. either straight ASCII or the IBM Bios scan code, plus 256, plus 512  for  Shift
  5282. key  held down, plus 1024 for Control key held down, plus 2048 for Alt key held
  5283. down; non-ASCII keys are always 256 decimal or greater.  Keys particular to the
  5284. Enhanced Keyboard have 4096 added to the result.
  5285.  
  5286. ---------------------------------------------------------------------------
  5287.  
  5288.     Heath-19 and VT52 Keypads                 VT102 keypad
  5289.        IBM Keys                                 IBM keys
  5290. +------+------+-------+----------+   +------+------+------+------+
  5291. | Blue |  Red |  Grey | up arrow |   |  PF1 |  PF2 |  PF3 |  PF4 |
  5292. |  F1  |  F2  |  F3   | up arrow |   |  F1  |  F2  |  F3  |  F4  |
  5293. +------+------+-------+----------+   +------+------+------+------+
  5294. |  7   |  8   |  9    |down arrow|   |  7   |  8   |  9   |  -   |
  5295. |  F5  |  F6  |  F7   |down arrow|   |  F5  |  F6  |  F7  |  F8  |
  5296. +------+------+-------+----------+   +------+------+------+------+
  5297. |  4   |  5   |  6    | rgt arrow|   |  4   |  5   |  6   |  ,   |
  5298. |  F9  |  F10 |  SF1  | rgt arrow|   |  F9  |  F10 |  SF1 |  SF2 |
  5299. +------+------+-------+----------+   +------+------+------+------+
  5300. |  1   |  2   |  3    |left arrow|   |  1   |  2   |  3   |  E   |
  5301. |  SF3 |  SF4 |  SF5  |left arrow|   |  SF3 |  SF4 |  SF5 |  n  S|
  5302. +------+------+-------+----------+   +------+------+------+  t  F|
  5303. |  0------0   |  .    |  Enter   |   |  0------0   |  .   |  e  6|
  5304. |  SF7        |  SF8  |  SF6     |   |   SF7       |  SF8 |  r   |
  5305. +-------------+-------+----------+   +-------------+------+------+
  5306.  
  5307. SF1 means push Shift and F1 keys simultaneously
  5308. ---------------------------------------------------------------------------
  5309.  
  5310.  CURSOR KEYS:
  5311.                                        H-19 & VT52           VT102
  5312.  VT52/H19 key   IBM Verb  IBM key       All Modes      Numeric   Application
  5313.  
  5314.  up arrow       UPARR    up arrow       ESC A          ESC [ A   ESC O A
  5315.  down arrow     DNARR    down arrow     ESC B          ESC [ B   ESC O B
  5316.  right arrow    RTARR    right arrow    ESC C          ESC [ C   ESC O C
  5317.  left arrow     LFARR    left arrow     ESC D          ESC [ D   ESC O D
  5318.  
  5319.  AUXILIARY KEYPAD:
  5320.                                       Heath-19 & VT52         VT102
  5321.  VT52/H19 key   IBM Verb  IBM key     Numeric Applic.   Numeric   Applic.
  5322.  
  5323.  PF1/HF7/Blue   GOLD,PF1   F1         ESC P   ESC P     ESC O P   ESC O P
  5324.  PF2/HF8/Red    PF2        F2         ESC Q   ESC Q     ESC O Q   ESC O Q
  5325.  PF3/HF9/Grey   PF3        F3         ESC R   ESC R     ESC O R   ESC O R
  5326.  PF4/HF1        PF4        F4         ESC S   ESC S     ESC O S   ESC O S
  5327.  0              KP0        SF7        0       ESC ? p   0         ESC O p
  5328.  1              KP1        SF3        1       ESC ? q   1         ESC O q
  5329.  2              KP2        SF4        2       ESC ? r   2         ESC O r
  5330.  3              KP3        SF5        3       ESC ? s   3         ESC O s
  5331.  4              KP4        F9         4       ESC ? t   4         ESC O t
  5332.  5              KP5        F10        5       ESC ? u   5         ESC O u
  5333.  6              KP6        SF1        6       ESC ? v   6         ESC O v
  5334.  7              KP7        F5         7       ESC ? w   7         ESC O w
  5335.  8              KP8        F6         8       ESC ? x   8         ESC O x
  5336.  9              KP9        F7         9       ESC ? y   9         ESC O y
  5337.  comma  (,)     KPCOMA     SF2        ,       ESC ? l   ,         ESC O l
  5338.  minus  (-)     KPMINUS    F8         -       ESC ? m   -         ESC O m
  5339.  period (.)     KPDOT      SF8        .       ESC ? n   .         ESC O n
  5340.  Enter          KPENTER    SF6        ^M(cr)  ESC ? M   ^M        ESC O M
  5341.  
  5342.  (SFn means hold down Shift key while pressing Function key n.)
  5343.  
  5344. An often confusing item is knowing the mode of the auxillary keypad: numeric or
  5345. application.  Digital Equipment Corporation designed  the  terminal  to  change
  5346. modes  only  under  command  from  the  remote computer and not at all from the
  5347. keyboard.  So the startup state is numeric/cursor mode, and reception of escape
  5348. sequences  "ESC  [ ? 1 h" or "l" changes the mode.  Kermit verbs for the keypad
  5349. and cursor keys generate the correct escape sequences appropriate to  the  cur-
  5350. rent mode and terminal type.
  5351.  
  5352. A best attempt is made to safely test for the 101/102 key Enhanced keyboard and
  5353. use it if present.  If it is present then the keyboard translator separates the
  5354. individual  arrow  keys from those on the numeric keypad and also separates the
  5355. asterisk and forward slash keys  on  the  keypad  from  those  on  the  regular
  5356. typewriter keyboard.  These special Enhanced keyboard keys are reported as scan
  5357. codes with 4096 added to the base scan code.
  5358.  OTHER IBM KEYS OPERATIONAL IN CONNECT MODE:
  5359.  
  5360.  IBM key         IBM Verb      Action
  5361.  
  5362.  Keypad Del                    Send ASCII Del code (rubout) \127
  5363.  Backspace (<-)                Send ASCII Del code (rubout) \127  (BS is \8)
  5364.  Keypad -        MODELINE      Toggle mode line on/off (only if Mode Line is
  5365.                                enabled and not used by the host).
  5366.  Alt -           TERMTYPE      Toggle among H-19, VT52, and VT100 emulations.
  5367.  Alt =           RESET         Clear screen and reset terminal emulator to
  5368.                                starting (setup) state.
  5369.  Alt B           BREAK         Send a BREAK signal
  5370.  Alt H           HELP          Show drop down help menu (detailed below)
  5371.  Alt S           STATUS        Show settings
  5372.  Alt X           EXIT          Exit Connect mode, back to Kermit prompt
  5373.  
  5374.  Home            HOMSCN        Roll screen up (text down) to beginning of
  5375.                                 storage.
  5376.  End             ENDSCN        Roll screen down (text up) to end of storage.
  5377.  PgUp            UPSCN         Roll screen up (back, earlier) one screen.
  5378.  PgDn            DNSCN         Roll screen down (forward, later) one screen.
  5379.  Ctrl-PgUp       UPONE         Roll screen up one line.
  5380.  Ctrl-PdDn       DNONE         Roll screen down one line.
  5381.  
  5382.  Control PrtSc   PRTSCN        Toggle  on/off copying of received text to
  5383.                                printer, "PRN" shows on far right of mode
  5384.                                line when activated.
  5385.  
  5386.  Control-End     DUMP          Dump image of screen to a disk file or device.
  5387.                                Default filename is KERMIT.SCN in the current
  5388.                                directory. Use command SET DUMP to change the
  5389.                                filename.  Screen images are appended to the
  5390.                                file, separated by formfeeds.
  5391.  
  5392.  Shift-PrtSc     Standard DOS Print-screen, dump screen image to printer.
  5393.  
  5394.  unassigned      HOLDSCRN      DEC style Holdscreen, same as typing Control-S.
  5395.  
  5396. "Alt -" means hold down Alt and type  minus  on  the  upper  key  rank.    This
  5397. switches  among the various kinds of emulation but does not change most operat-
  5398. ing parameters of the emulator.
  5399.  
  5400. CONNECT ESCAPE COMMANDS:
  5401.  
  5402. Type the Kermit escape character (normally "^]"), then one of the keys below:
  5403.                                                          (equivalent IBM Verb)
  5404.      ?   display this short list.                                HELP
  5405.      0   send a null character.                                  NULL
  5406.      B   send a BREAK signal.                                    BREAK
  5407.      C   close connect session & return to Kermit prompt.        EXIT
  5408.      F   dump screen to filespec, default is KERMIT.SCN.         DUMP
  5409.      H   hangup the phone or network connection                  HANGUP
  5410.      L   send a Long BREAK signal                                LBREAK
  5411.      M   toggle mode line on/off.                                MODELINE
  5412.      P   push to DOS.                                            DOS
  5413.      Q   quit (suspend) logging.                                 LOGOFF
  5414.      R   resume logging.                                         LOGON
  5415.      S   show status.                                            STATUS
  5416.      Kermit escape character itself: send it to the host.
  5417.  
  5418.  
  5419. 1.17.3. Responses To Characters Received By the Terminal Emulator
  5420.  
  5421. Spaces shown between characters of escape sequences are there for ease of read-
  5422. ing.   The actual sequences contain no spaces.  Unknown escape sequences of the
  5423. form "ESC char" are absorbed by the emulator without further effect; longer un-
  5424. known escape sequences echo the extra characters.
  5425.  
  5426. DEC  VT102 functions while in ANSI (VT102) mode, unsupported features marked by
  5427. an asterisk (*):
  5428.  Escape Seq     Mnemonic       Description of Action
  5429.  
  5430.  ESC D          IND            Index, moves cursor down one line, can scroll
  5431.  ESC E          NEL            Move cursor to start of line below, can scroll
  5432.  ESC H          HTS            Set one horizontal tab at current position
  5433.  ESC M          RI             Reverse Index, cursor up one line, can scroll
  5434.  ESC Z          DECID          Identify terminal (response is ESC [ ? 6 c)
  5435.  ESC c          RIS            Reset terminal to initial state
  5436.  ESC =          DECKPAM        Enter keypad application mode
  5437.  ESC >          DECKNPNM       Enter keypad numeric mode
  5438.  ESC 7          DECSC          Save cursor position and attributes
  5439.  ESC 8          DECRC          Restore cursor from previously saved position
  5440.  ESC # 3        DECDHL         Double height and width line, top half
  5441.  ESC # 4        DECDHL         Double height and width line, bottom half
  5442.  ESC # 5        DECSWL         Single height and width line
  5443.  ESC # 6        DECDWL         Double width single height line
  5444.  ESC # 8        DECALN         Test screen alignment, fill screen with E's
  5445.  ESC [ Pn @     ICH            ANSI insert Pn spaces at and after cursor
  5446.  ESC [ Pn A     CUU            Cursor up Pn lines, does not scroll
  5447.  ESC [ Pn B     CUD            Cursor down Pn lines, does not scroll
  5448.  ESC [ Pn C     CUF            Cursor forward, stays on same line
  5449.  ESC [ Pn D     CUB            Cursor backward, stays on same line
  5450.  ESC [ Pn; Pn H CUP            Set cursor to row, column (same as HVP)
  5451.  ESC [ Ps J     ED             Erase in display:
  5452.                                 0 = cursor to end of screen, inclusive
  5453.                                 1 = start of screen to cursor, inclusive
  5454.                                 2 = entire screen, reset lines to single
  5455.                                     width, cursor does not move.
  5456.  ESC [ Ps K     EL             Erase in line:
  5457.                                 0 = cursor to end of line, inclusive
  5458.                                 1 = start of line to cursor, inclusive
  5459.                                 2 = entire line, cursor does not move
  5460.  ESC [ Pn L     IL             Insert Pn lines preceding current line.
  5461.  ESC [ Pn M     DL             Delete Pn lines from current downward, incl.
  5462.  ESC [ Pn P     DCH            Delete Pn chars from cursor to left, incl.
  5463.  ESC [ Pn; Pn R CPR            Cursor report (row, column), sent by terminal
  5464.                                Example: home position yields ESC [ 1; 1 R
  5465.  ESC [ Pn c     DA             Device attributes (reports ESC [ ? 6 c)
  5466.  ESC [ Pn; Pn f HVP            Set cursor to row, column (same as CUP)
  5467.  ESC [ Ps g     TBC            Tabs clear, 0 = at this position, 3 = all
  5468.  ESC [ 4 h      IRM            Insert mode on
  5469.  ESC [ 20 h     LNM            Set newline mode (cr => cr/lf)
  5470.  ESC [ 4 l      IRM            Replacement mode on
  5471.  ESC [ 20 l     LNM            Reset newline mode (cr => cr)
  5472.  ESC [ ? Ps;...;Ps h  SM       Set mode, see table below
  5473.  ESC [ ? Ps;...;Ps l  RM       Reset mode, see table below
  5474.          Ps     Mnemonic       Mode           Set (h)        Reset (l)
  5475.          0                     error (ignored)
  5476.          1      DECCKM         cursor keys    application    cursor/numeric
  5477.          2      DECANM         ANSI/VT52      ANSI/VT102     VT52
  5478.          3      DECCOLM        Columns        +132 col       80 col
  5479.          4      DECSCLM       *Scrolling      smooth         jump
  5480.          5      DECSCNM        Screen         reverse video  normal
  5481.          6      DECOM          Origin         relative       absolute
  5482.          7      DECAWM         Autowrap       on             off
  5483.          8      DECARM        *Autorepeat     on             off
  5484.          9      DECINLM       *Interlace      on             off
  5485.          18     DECPFF         Printer termination character, use FF if set
  5486.          19     DECPEX         Printer extent,set=screen,off=scrolling region
  5487.          34     n/a            Invoke macro:  TERMINALS      TERMINALR
  5488.          38     n/a            Graphics (Tek) ++graphics     text
  5489.                              + See comments on EGA boards.
  5490.                             ++ Ignored if DISABLE TEK has been given.
  5491.  ESC [ Pn i     MC             Printer controls (Media Copy)
  5492.          0                      Print whole Screen
  5493.          4                      Exit printer controller (transparent print)
  5494.          5                      Enter printer controller (transparent print)
  5495.  ESC [ ? Pn i   MC             Printer controls (Media Copy)
  5496.          1                      Print line containing cursor
  5497.          4                      Exit auto print (stop echoing to printer)
  5498.          5                      Enter autoprint (echo screen chars to printer)
  5499.  ESC [ Ps;...;Ps m  SGR        Select graphic rendition
  5500.                                 0 = all attributes off (#'s 1, 4, 5, 7)
  5501.                                 1 = bold, intensify foreground
  5502.                                 4 = underscore (reverse video on IBM CGA)
  5503.                                 5 = blink
  5504.                                 7 = reverse video
  5505.                 non-DEC extensions: 30-37 = foreground color = 30 + colors
  5506.                                     40-47 = background color = 40 + colors
  5507.                                     colors: 1 = red, 2 = green, 4 = blue
  5508.  ESC [ Ps n     DSR            Device Status Report.
  5509.                                Response from VT100: 0=ready, 3=malfunction.
  5510.                                Command to VT100: 5=report status with DSR,
  5511.                                6=report cursor position using CPR sequence.
  5512.  ESC [ Ps;...;Ps q  DECLL      Load LEDs, Ps = 0 means clear LED #1-4
  5513.                                Ps = 1,2,3,4 sets LED # 1,2,3,4 on status line.
  5514.  ESC [ Pn; Pn r DECSTBM        Set top and bottom scrolling margins, resp.
  5515.                                ESC [ r resets margin to full screen.
  5516.  ESC [ sol x    DECREQTPARM    Request terminal parameters, see table below
  5517.  ESC [ sol; par; nbits; xspeed; rspeed; clkmul; flags x
  5518.                 DECREPTPARM    Reports terminal parameters
  5519.                                sol = 0  request; terminal can send unsolicited
  5520.                                  reports - supported as sol = 1 below.
  5521.                                sol = 1, request; term reports only on request
  5522.                                sol = 2, this is a report (DECREPTPARM)
  5523.                                sol = 3, terminal reporting only on request
  5524.                                par = 1 none, 2 space, 3 mark, 4 odd, 5 even
  5525.                                nbits = 1 (8 bits/char), 2 (7 bits/char)
  5526.                                xspeed,rspeed = transmit & receive speed index
  5527.   0,8,16,24,32,40,48,56,64,72,80,88,96,104,112,120,128 correspond to speeds of
  5528.   50,75,110,134.5,150,200,300,600,1200,1800,2000,2400,3600,4800,9600,19200,
  5529.   and 38400 baud.              clkmul = 1 (clock rate multiplier is 16)
  5530.                                flags = 0-15 (Setup Block #5), always 0 here
  5531.  ESC [ 2; Ps y  DECST          *Confidence tests - not supported
  5532.                 SCS            Select character sets.
  5533.  ESC ( A        SCS            G0 points to UK symbols
  5534.  ESC ) A        SCS            G1 points to UK symbols
  5535.  ESC ( B        SCS            G0 points to ASCII symbols
  5536.  ESC ) B        SCS            G1 points to ASCII symbols
  5537.  ESC ( 0        SCS            G0 points to special (line drawing) graphics
  5538.  ESC ) 0        SCS            G1 points to special (line drawing) graphics
  5539.  ESC ( 1        SCS            G0 points to alt char ROM - national symbols
  5540.  ESC ) 1        SCS            G1 points to alt char ROM - national symbols
  5541.  ESC ( 2        SCS            G0 points to alt graphics ROM - as ESC ( 0
  5542.  ESC ) 2        SCS            G1 points to alt graphics ROM - as ESC ) 0
  5543.                                 (Separate graphics used for DEC and Heath)
  5544.  ^E             ENQ           *Answerback message (not supported)
  5545.  ^G             BELL           Sound VT102 style beep
  5546.  ^H             BS             Backspace, move cursor left one character
  5547.  ^I             HT             Horizontal tab, move cursor to next tabstop
  5548.  ^J             LF             Linefeed, move cursor down one line
  5549.  ^K             VT             Vertical Tab, treated as a line feed
  5550.  ^L             FF             Formfeed, treated as a line feed
  5551.  ^M             CR             Carriage return, move cursor to col 1
  5552.  ^N             SO             Select usage of G1 character set
  5553.  ^O             SI             Select usage of G0 character set
  5554.  ^X             CAN            Cancel escape sequence in progress
  5555.  ^Z             SUB            Treated as a CAN
  5556.  
  5557.  Other extensions:
  5558.  ESC [ 25; Pc f                VT52/VT100 move cursor to 25th line.
  5559.  ESC [ 25; Pc H                VT52/VT100 move cursor to 25th line.
  5560.                                (These will disable Kermit's own status line.)
  5561.  ESC * char                    VT200 series graphics command, ignored.
  5562.  ESC ^L                        Enter Tektronix sub-mode, clear Tek screen.
  5563.                                (This is ignored if DISABLE TEK has been given)
  5564.  
  5565.  
  5566. 1.17.4. DEC VT102 Functions While in VT52 Mode
  5567.  
  5568.  Escape sequence               Description of action
  5569.  
  5570.  ESC A                         Cursor up
  5571.  ESC B                         Cursor down
  5572.  ESC C                         Cursor right
  5573.  ESC D                         Cursor left
  5574.  ESC F                         Enter graphics mode
  5575.  ESC G                         Exit graphics mode
  5576.  ESC H                         Cursor home
  5577.  ESC I                         Reverse line feed
  5578.  ESC J                         Erase to end of screen
  5579.  ESC K                         Erase to end of line
  5580.  ESC V                         Print cursor line
  5581.  ESC X                         Exit Printer Controller mode, transparent print
  5582.  ESC Y row column              Direct cursor address, offset from space
  5583.  ESC W                         Enter Printer Controller mode,transparent print
  5584.  ESC Z                         Identify (response is ESC / Z)
  5585.  ESC ^ (caret)                 Enter autoprint mode (printer echoes screen)
  5586.  ESC _ (underscore)            Exit autoprint mode
  5587.  ESC ]                         Print Screen
  5588.  ESC =                         Enter alternate keypad mode
  5589.  ESC >                         Exit alternate keypad mode
  5590.  ESC <                         Enter ANSI mode (changes to VT102)
  5591.  
  5592.  
  5593. 1.17.5. Heath-19 Functions While in Non-ANSI Mode
  5594.  
  5595.  Escape seq     Mnemonic       Description of action
  5596.  
  5597.  ESC A          HCUU           Cursor Up
  5598.  ESC B          HCUD           Cursor Down
  5599.  ESC C          HCUF           Cursor Forward, stays on same line
  5600.  ESC D          HCUB           Cursor Backward, stays on same line
  5601.  ESC E          HCD            Clear display
  5602.  ESC F          HEGM           Enter Graphics mode
  5603.  ESC G          HXGM           Exit Graphic mode
  5604.  ESC H          HCUH           Cursor Home
  5605.  ESC I          HRI            Reverse Index
  5606.  ESC J          HEOP           Erase to end of page
  5607.  ESC K          HEOL           Erase to end of line
  5608.  ESC L          HIL            Insert line
  5609.  ESC M          HDL            Delete line
  5610.  ESC N          HDCH           Delete character
  5611.  ESC O          HERM           Exit Insert Char mode
  5612.  ESC Y row col  HDCA           Direct cursor addressing, offset from space
  5613.  ESC Z          HID            Identify (response is ESC / K  which is a VT52)
  5614.  ESC b          HBD            Erase Beginning of display
  5615.  ESC j          HSCP           Save cursor position
  5616.  ESC k          HRCP           Set cursor to saved position
  5617.  ESC l          HEL            Erase entire line
  5618.  ESC n          HCPR           Cursor Position Report request
  5619.  ESC o          HEBL           Erase beginning of line
  5620.  ESC p          HERV           Enter Reverse Video mode
  5621.  ESC q          HXRV           Exit Reverse Video mode
  5622.  ESC r Bn       HMBR           *Modify baud rate - not supported
  5623.  ESC t          HEKS           *Enter Keypad shifted mode, not supported
  5624.  ESC u          HXKS           *Exit Keypad shifted mode, not supported
  5625.  ESC v          HEWA           Wrap around at end of line
  5626.  ESC w          HXWA           Discard at end of line
  5627.  ESC x Ps       HSM            Set Mode. See table below
  5628.  ESC y Ps       HRM            Reset Mode. See table below
  5629.  
  5630.          Ps     Mnemonic       Mode            Set (x)        Reset (y)
  5631.          1      HSM/HRM        25th line       enabled       +disabled
  5632.          2                    *keyclick        off            on
  5633.          3                    *holdscreen      enabled        disabled
  5634.          4                     cursor type     block          underline
  5635.          5                     cursor on/off   on             off
  5636.          6                    *keypad-shifted  shifted        unshifted
  5637.          7                     alt app keypad  enabled        disabled
  5638.          8                    *linefeed        lf=>cr/lf      lf=>lf
  5639.          9                     newline mode    cr=>cr/lf      cr=>cr
  5640.                               + disabling the 25th line also clears it
  5641.  
  5642.  ESC z          HRAM           Reset to power-up configuration
  5643.  ESC =          HAKM           Enter Alternate Keypad mode
  5644.  ESC >          HXAM           Exit Alternate Keypad mode
  5645.  ESC <          HEAM           Enter ANSI mode (ESC [ stuff)
  5646.  ESC @          HEIM           Enter Insert Char mode
  5647.  ESC [          HEHS          *Enter Hold Screen mode, not supported
  5648.  ESC \          HXHS          *Exit Hold Screen mode, not supported
  5649.  ESC { and }    HEK, HDK      *Keyboard enable/disable, not supported
  5650.  ESC ]          HX25          *Transmit 25th line, not supported
  5651.  ESC #          HXMP          *Transmit page, not supported
  5652.  
  5653.  
  5654. 1.17.6. Heath-19 Functions While in ANSI Mode
  5655.  
  5656.  Escape Seq     Mnenonic       Description of Action
  5657.  
  5658.  ESC [ s        PSCP           Save cursor position & attributes
  5659.  ESC [ u        PRCP           Restore cursor position & attributes
  5660.  ESC [ z        PRAM           Reset to power-up configuration
  5661.  ESC [ 2 J      ED             Erase entire screen but do not move cursor;
  5662.                                regular Heath-19 moves cursor to Home.
  5663.  ESC [ ? 2 h    PEHM           Revert to normal Heath-19 non-ANSI mode
  5664.  ESC [ > Ps h   SM             Same as ESC x Ps
  5665.  ESC [ > Ps l   RM             Same as ESC y Ps
  5666. Plus most of the ANSI escape sequences listed for the VT102.
  5667. 1.17.7. Tektronix 4010/4014 Graphics Terminal Functions
  5668.  
  5669. MS-Kermit's Tektronix 4010 emulator responds to ordinary text, several  special
  5670. control  codes  (for  drawing lines and dots), and several escape sequences, as
  5671. shown in Table 1-10.  The commands SET DEBUG and SET TRANSLATION INPUT are  ef-
  5672. fective in Tek mode.
  5673.  
  5674. -------------------------------------------------------------------------------
  5675.  
  5676. Control Code                  Action
  5677. FS,  Control-\  Backslash     draw dots
  5678. GS,  Control-]  Right square bracket  draw lines
  5679. RS,  Control-^  Caret         Draw dots incrementally
  5680. US,  Control-_  Underscore    Display text
  5681. BEL, Control-G                Beep, make a noise
  5682. BS,  Control-H                Backspace, non-destructive
  5683. HT,  Control-I                Tab, convert to single space
  5684. LF,  Control-J                Line feed, go down one line
  5685. VT,  Control-K                Move up one text line
  5686. FF,  Control-L                Clears the screen
  5687. CR,  Control-M                Carriage return, start of line
  5688. CAN, Control-X                Exit Tek sub-mode, or ignore
  5689. DEL, RUBOUT                   Delete code, same as BS
  5690.  
  5691. Escape Sequence               Action
  5692. ESC Control-E                 Send a status report, turn on Bypass mode
  5693. ESC Control-L                 Clear the screen (enter sub-mode from VT102)
  5694. ESC Control-X                 Turn on Bypass mode
  5695. ESC Control-Z                 Activate crosshairs (GIN mode) and Bypass mode
  5696. ESC Z                         Send terminal identification
  5697. ESC ` (accent grave)                  Use solid lines in drawing
  5698. ESC a through ESC e                   Use dashed line patterns:
  5699.                                a=fine dots, b=short dashes
  5700.                                c=dash dot,  d=long dash dot
  5701.                                e=dash dot dot.
  5702. ESC [ Pn ; Pn m               Set ANSI colors. Same as for VT102.
  5703. ESC [ ? 3 8 l                 Exit Tek mode (become text terminal, VT102 etc)
  5704. ESC [ ? 3 8 h                 Enter Tek mode (from VT102 mode)
  5705.  
  5706.  Table 1-10:  Response of MS-Kermit Tektronix Emulator to Received Characters
  5707.  
  5708. -------------------------------------------------------------------------------
  5709.  
  5710. In  the  table,  US  is the name for the ASCII character Control-Underscore, 31
  5711. decimal.  Text is written starting with the last drawn point  being  the  lower
  5712. left  corner  of  the first 8 by 8 character cell.  The drawing position is up-
  5713. dated by 8 dots to the right for each character, and lines wrap  at  column  80
  5714. (column  90  for Hercules boards).  If text extends "below the screen" the sign
  5715. "More >" is shown at the bottom right corner and the user needs to press a  key
  5716. to  continue.    Then the screen will be cleared and the new text will start at
  5717. the top of the screen (no scrolling is done in graphics mode).  A real Tek 4010
  5718. begins  new text at column 40 and will overwrite dots from older material.  The
  5719. high resolution EGA screen and the Hercules screen will hold 43 lines, the  CGA
  5720. and  Monochome screens hold 25 lines, and the AT&T screen holds 50 lines.  Her-
  5721. cules screens are 90  characters  wide  and  others  are  80  characters  wide.
  5722. Monochrome  systems  lack graphics so the text is the normal hardware character
  5723. font placed at the nearest  normal  80x25  location  (similarly,  "drawing"  on
  5724. Monochrome  systems  is  achieved  by  using a text plus ("+") sign where a dot
  5725. would appear).  Text mode is interrupted  by  the  drawing  commands  discussed
  5726. below.
  5727.  
  5728.  
  5729. Bypass Mode:
  5730.  
  5731. Certain  Tektronix  commands turn on or off "Bypass" mode whereby incoming text
  5732. is not displayed on the screen. Removal of echos of  the  GIN  mode,  discussed
  5733. below,  is  the major use of Bypass. Bypass mode is turned on by receipt of ESC
  5734. Control-E, ESC Control-X, and ESC Control-Z and it is turned off  upon  receipt
  5735. of BEL, LF, CR, US, other escape sequences, and resetting the terminal.
  5736.  
  5737.  
  5738. Drawing commands GS, FS, RS:
  5739.  
  5740. 1. Draw a line or move to a point: GS <xy xy ... xy>
  5741.  
  5742. GS  is  the  name for ASCII character Control-] (right square bracket), decimal
  5743. 29.  <xy> stands for an encoded x,y coordinate as explained below.  One or more
  5744. x,y  coordinates may follow GS and line segments are drawn from point to point.
  5745. The first point is reached without drawing so that GS and the initial <xy> is a
  5746. simple  "move-to"  command  rather than a "draw-to" command.  Lines may be con-
  5747. structed from six dash patterns described in Table 1-10.  <xy> coordinates  are
  5748. encoded  by separating the 10 bit value of x and of y into 5 bit components and
  5749. then adding two high  bits  to  each  to  identify  which  component  is  being
  5750. represented:  high-y, low-y, high-x, or low-x. They are transmitted in that or-
  5751. der, with the low-x byte always sent last.  In fact, bytes may  be  omitted  if
  5752. they  do  not  change  from point to point, provided that low-x is always sent.
  5753. These bytes range from ASCII space (32 decimal) to  ASCII  DEL  (127  decimal).
  5754. Details  are  given  below,  and summarized in Table 1-12.  This mode completes
  5755. when a new command or a CR LF (carriage return, line feed) arrives; escape  se-
  5756. quences  are  processed transparently but other control codes are ignored.  The
  5757. interrupting character is accepted and processed next.
  5758.  
  5759. 2. Draw dots at given locations: FS <xy xy ... xy>
  5760.  
  5761. FS is the name for the ASCII character Control-\ (backslash), decimal 28.  <xy>
  5762. is  in  the  same  form as above.  A dot is drawn at each x,y point.  This mode
  5763. completes when a new command or a CRLF character arrives; escape sequences  are
  5764. processed  transparently but other control codes are ignored.  The interrupting
  5765. character is accepted and processed next.
  5766.  
  5767. 3. Draw dots from the current location: RS <pen>  <direction>  <direction>  ...
  5768. <direction>
  5769.  
  5770. RS  is  the name for the ASCII character Control-^ (caret), decimal 30.  pen is
  5771. the character Space (32 decimal) to move without drawing or P (80  decimal)  to
  5772. draw while moving.  <direction> is one of the letters A, E, D, F, B, J, H, I as
  5773. shown in Table 1-11.
  5774.  
  5775. -------------------------------------------------------------------------------
  5776.  
  5777. direction    Move One Tek Dot This Way
  5778.      A       East (right)
  5779.      E       East and North         F   D   E
  5780.      D       North (up)
  5781.      F       North and West         B   *   A     (* is current location)
  5782.      B       West
  5783.      J       South and West         J   H   I
  5784.      H       South
  5785.      I       South and East
  5786.  
  5787.                   Table 1-11:  Tektronix Dot-Drawing Commands
  5788.  
  5789. -------------------------------------------------------------------------------
  5790.  
  5791. Example: RS P J J J (no spaces here, naturally) means draw three  dots  in  the
  5792. southwest  direction, stepping to each in turn.  This mode completes when a new
  5793. command or a non-<pen> or non-<direction> character arrives;  the  interrupting
  5794. character is accepted and processed next.
  5795.  
  5796.  
  5797. Graphics INput (GIN) mode:
  5798.  
  5799. Graphics  input mode is entered when ESC Control-Z is received.  A crosshair is
  5800. drawn on the screen and may be moved by the numeric keypad arrows  (fine  scale
  5801. motion)  or  the Shift key and these arrows (coarse scale motion).  Pressing an
  5802. ASCII-producing key sends the position of the crosshairs to the host as the se-
  5803. quence  of:  pressed  key,  X  coordinate,  Y coordinate, carriage return, then
  5804. removes the crosshairs, and then returns to text mode.  The coordinates are en-
  5805. coded  by  splitting  them into five bit fields, adding an ascii space (20H) to
  5806. each, and are sent as high-y, low-y, high-x and low-x bytes. Bypass mode is ac-
  5807. tive  while  the report is sent to supress echos of the report.  One may prema-
  5808. turely exit GIN mode by typing Control-C or Control-Break.    Shift-PrtSc  (DOS
  5809. screen dump) remains active, however.
  5810.  
  5811.  
  5812. Status or Position Report:
  5813.  
  5814. ESCAPE  Control-E  requests  a  status report from the emulator.  Tek terminals
  5815. have many sub-fields.  Kermit-MS sends a byte of 24 hex for being in text  mode
  5816. or  20  hex  otherwise, followed by the encoded X then Y coordinates and a car-
  5817. riage return.  Coordinates are encoded 5 bits at a  time  similar  to  the  GIN
  5818. report.
  5819.  
  5820.  
  5821. Identification Report:
  5822.  
  5823. ESCAPE  Z  requests  terminal identification, as for VT52 and VT102.  Currently
  5824. this report is the 10 character sequence IBM_TEK ESCAPE / Z (no spaces).
  5825.  
  5826.  
  5827. Screen Capturing:
  5828.  
  5829. Kermit does not implement a graphics screen capture facility.  There  are  many
  5830. such  Terminate-and-Stay-Resident  (TSR)  programs  in  circulation,  as either
  5831. public domain offerings or parts of commercial  packages  (Paint  programs  and
  5832. even GRAPHICS.COM from DOS).  High resolution EGA screens require more than the
  5833. GRAPHICS.COM program.  MS Windows tells the program (Kermit-MS) the  system  is
  5834. using a pure text-only monochrome adapter so dots are shown as plus signs.
  5835.  
  5836. Although  Kermit  cannot  save  graphics  screens  directly  (e.g.  via the ^]F
  5837. connect-mode command), the received Tektronix escape  sequences  can  still  be
  5838. logged to a PC file using the LOG SESSION command.  The resulting log cannot be
  5839. "played back" directly on the PC, but it can be transferred to the host and run
  5840. through  Kermit's Tek emulator again, just like a character-mode Kermit session
  5841. log.
  5842.  
  5843.  
  5844. VGA Modes:
  5845.  
  5846. Considerable  effort  went  into  ensuring  the  graphics  display  would  work
  5847. automatically and not damage monitors.  Thus, Kermit-MS safely tests the active
  5848. display adapter for its kind and capabilities before  starting  graphics  mode.
  5849. Recent  VGA  and  EGA+  display  boards are capable of the 640 by 480 scan-line
  5850. 16-color "VGA" mode which is now available on IBM  PS/2  computers.    The  Tek
  5851. emulator  will  happily run with 480 scan lines, but: the normal 256KB of video
  5852. memory is sufficient to save only the top 407 lines of the graphics image.   So
  5853. activating  this higher resolution mode is accomplished by the command SET TER-
  5854. MINAL GRAPHICS VGA and is not done automatically (the VGA is used in EGA mode).
  5855. The  320  by  200  line  by 256 color MCGA mode has too coarse a resolution for
  5856. graphics line drawing and is not supported by Kermit.
  5857.  
  5858.  
  5859. Coordinate Encoding:
  5860.  
  5861. Coordinate 0,0 is the lower left corner and the X axis is horizontal. Tektronix
  5862. positions  are  mapped into the typically 640 dots wide by 200 or 350 dots high
  5863. PC screen and thus adjacent Tek positions may yield the same PC screen dot.
  5864.  
  5865. 4010-like devices use positions from 0 to 1023 for both X and Y, although  only
  5866. 0  to 779 are visible for Y due to screen geometry.  The Tek screen is 10.24 by
  5867. 7.80 inches and coordinates are sent as 1-4 characters.
  5868.  
  5869. 4014-like devices use positions 0 to 4095, but each movement is a multiple of 4
  5870. positions  unless the high-resolution LSBXY are sent.  This makes it compatible
  5871. with the 4010 in that a full sized plot fills the screen.  The emulator accepts
  5872. the LSBXY components but does not use them.
  5873.  
  5874. The various modes are summarized in Table 1-12, in which the following notation
  5875. is used:
  5876.  
  5877.     HIX, HIY = High order 5 bits of a 10 or 12 bit position.
  5878.     LOX, LOY = Middle order 5 bits of position (low order of Tek 4010).
  5879.     LSBXY = Low order 2 bits of X + low order 2 bits of Y (4014 mode),
  5880.        recognized by the Tek emulator but not used to calculate position.
  5881.  
  5882. -------------------------------------------------------------------------------
  5883.  
  5884. Hi Y    Lo Y   Hi X    LSBXY  Characters Sent (Lo-X Always Sent)
  5885. Same    Same   Same    Same                          Lo-X
  5886. Same    Same   Same    Diff         LSB, Lo-Y,       Lo-X   4014
  5887. Same    Same   Diff    Same              Lo-Y, Hi-X, Lo-X
  5888. Same    Same   Diff    Diff         LSB, Lo-Y, Hi-X, Lo-X   4014
  5889. Same    Diff   Same    Same              Lo-Y,       Lo-X
  5890. Same    Diff   Same    Diff         LSB, Lo-Y,       Lo-X   4014
  5891. Same    Diff   Diff    Same              Lo-Y, Hi-X, Lo-X
  5892. Same    Diff   Diff    Diff         LSB, Lo-Y, Hi-X, Lo-X   4014
  5893. Diff    Same   Same    Same   Hi-Y,                  Lo-X
  5894. Diff    Same   Same    Diff   Hi-Y, LSB, Lo-Y,       Lo-X   4014
  5895. Diff    Same   Diff    Same   Hi-Y,      Lo-Y, Hi-X, Lo-X
  5896. Diff    Same   Diff    Diff   Hi-Y, LSB, Lo-Y, Hi-X, Lo-X   4014
  5897. Diff    Diff   Same    Same   Hi-Y,      Lo-Y,       Lo-X
  5898. Diff    Diff   Same    Diff   Hi-Y, LSB, Lo-Y,       Lo-X   4014
  5899. Diff    Diff   Diff    Same   Hi-y,      Lo-Y, Hi-X, Lo-X
  5900. Diff    Diff   Diff    Diff   Hi-y, LSB, Lo-Y, Hi-X, Lo-X   4014
  5901. Kind code for byte:           20h   60h  60h   20h   40h
  5902.                               (transmitted left to right)
  5903.  
  5904.           Table 1-12:  MS-Kermit Tektronix Coordinate Interpretation
  5905.  
  5906. -------------------------------------------------------------------------------
  5907.  
  5908. Note that LO-Y must be sent if HI-X has changed so that the Tektronix knows the
  5909. HI-X  byte  (in  the range of 20h-3Fh) is HI-X and not HI-Y.  LO-Y must also be
  5910. sent if LSBXY has changed, so that the 4010 will ignore LSBXY and accept  LO-Y.
  5911. The LSBXY byte is
  5912.  
  5913.     60h + (MARGIN * 10h) + (LSBY * 4) + LSBX
  5914.  
  5915. MARGIN  is  0  here  and refers to splitting the screen left and right for text
  5916. rollover, which the Kermit Tek emulator does not do.
  5917.  
  5918.  
  5919. Tek 4010 Example:
  5920.  
  5921. Suppose <xy> is point y = 300, x = 500 in Tektronix coordinates.    Split  each
  5922. 10-bit  coordinate into 5-bit groups, add add the Kind code to each. Send the X
  5923. part last.
  5924.  
  5925.                     HI-Y     LO-Y                   HI-X     LO-X
  5926.     Y=300d=012Ch=  01001    01100   X=500d=01F4h=  01111    10100
  5927.       +Kind code +100000 +1100000     +kind code +100000 +1000000
  5928.     Binary        101001 01101100                 101111  1000100
  5929.     ASCII            )       l                       /       D
  5930.  
  5931. So <xy> = (500,300) is sent or received in a GS command as ")l/D".  An  example
  5932. in C (program fragments):
  5933.  
  5934. #define ESC  27
  5935. #define GS   29
  5936. #define US   31
  5937. FILE *fp;                      /* File descriptor for terminal */
  5938.  . . .
  5939.  
  5940.     fputc( GS, fp); coord( 75, 65);       /* Move to 75,65      */
  5941.     fputc( ESC, fp); fputs("[31m", fp);   /* Set foreground to red */
  5942.     fputc( US, fp); fputs("A House", fp); /* Annotate at 75,65  */
  5943.     fputc( ESC, fp); fputs("[33m", fp);   /* Set foreground to yellow */
  5944.     fputc( GS, fp);                       /* Now draw lines...  */
  5945.     coord( 50, 50); coord(300, 50);       /* Bottom side        */
  5946.     coord(300,200); coord( 50,200);       /* Right wall, top    */
  5947.     coord(175,250); coord(300,200);       /* Roof               */
  5948.     fputc( GS, fp);                       /* Start a new line   */
  5949.     coord( 50, 50); coord( 50,200);       /* Left wall at 50,50 */
  5950.     fputc( ESC, fp); fputs("[37m", fp);   /* Set foreground to white */
  5951.     . . .
  5952.  
  5953. coord(x, y) int x, y; {        /* Send x,y coordinates to Tek 4010 */
  5954.     fputc((y / 32) + 32, fp);             /* High y */
  5955.     fputc((y % 32) + 96, fp);             /* Low  y */
  5956.     fputc((x / 32) + 32, fp);             /* High x */
  5957.     fputc((x % 32) + 64, fp);             /* Low  x */
  5958. }
  5959.  
  5960.  
  5961. 1.18. IBM PC Kermit Technical Summaries
  5962.  
  5963. Under  normal  circumstances,  MS-Kermit  takes  advantage  of  the  computer's
  5964. hardware, and often bypasses DOS (sometimes even BIOS) to achieve high  perfor-
  5965. mance, to exercise special machine features, or to produce an attractive screen
  5966. display.  Thus, it is not in all respects a "well behaved" DOS program.
  5967.  
  5968. MS-Kermit redirects interrupts 0BH (COM2/4) or 0CH (COM1/3), 14H (serial port),
  5969. 23H  (Control-Break),  24H  (DOS Critical Error) and returns them when done. It
  5970. uses the BIOS for keyboard, video display, and system  information  interrupts.
  5971. It examines segment 40H for EGA operating modes and it does direct screen reads
  5972. and writes.  Memory for the screen roll backbuffer is negotiated  with  DOS  to
  5973. leave  room  for a second copy of COMMAND.COM to run tasks within Kermit; about
  5974. 100KB to 148KB is needed for the entire program.  Video page zero  is  normally
  5975. used,  but  page  one is employed to save screens with non-standard dimensions.
  5976. Hercules and other graphics mode displays are supported only in Tektronix  ter-
  5977. minal  mode.    Kermit's  timing  delays are dynamically adjusted each time the
  5978. serial port is started to accomodate machines of different speeds; duration  of
  5979. the  normal  software  timing loop is measured with the hardware timer chip and
  5980. looping is adjusted to produce uniform delays on 8088 through 80386 machines.
  5981.  
  5982.  
  5983. 1.18.1. Kermit-MS/IBM on Local Area Networks
  5984.  
  5985. The IBM version of Kermit-MS has support for the IBM Local Area Network NetBIOS
  5986. (and  emulators) interface, Interrupt 5CH, with additional support for selected
  5987. vendor specific features (presently just AT&T STARLAN), activated  by  the  SET
  5988. PORT  NET  command,  described above, direct support for the Ungermann Bass Net
  5989. One proprietary Interrupt 14h interface, and via SET  PORT  BIOSn  support  for
  5990. many  other  networks which intercept the Bios serial port interrupt 14h.  Com-
  5991. munications across a LAN occurring through the NetBIOS  interface  use  virtual
  5992. circuits  (Sessions), named nodes, and conventional NetBIOS packets.  Kermit-MS
  5993. does not use LAN terminal interface packages  nor  the  Redirector  or  similar
  5994. functions.
  5995.  
  5996. Kermit  LAN  operations  are  harmonious  with normal network activity and many
  5997. pairs of Kermits can communicate simultaneously.  Kermit does not use LAN  File
  5998. Server functions, since these are proprietary and vendor-specific.  Kermit can,
  5999. however, send and receive files to/from a LAN file server.
  6000.  
  6001. Since Kermit uses the standard NetBIOS interrupt 5CH interface, it will run  on
  6002. most  LANS including IBM PC Net, IBM Token Ring, AT&T STARLAN, and many others,
  6003. and will run with Novell  NetWare  software.    Presently,  Kermit  knows  some
  6004. details  of  STARLAN and is able to send a BREAK across the net and can use ISN
  6005. node names with long path parts.  If STARLAN is not  operating  these  features
  6006. are not available.  As more detailed information becomes available special fea-
  6007. tures of other networks can be built-in.
  6008.  
  6009. The sequence of operations is similar for a client or server Kermit.   The  SET
  6010. PORT  NET command is issued by both. This command causes Kermit to validate the
  6011. presence of the Interrupt 5CH interface, test for vendor additions, test for  a
  6012. session  already underway, establish and display a unique Kermit node name, but
  6013. not make a network session.  The node name of the remote server machine follows
  6014. the  word  NET;  this  is  not  to be confused with our own node name discussed
  6015. below.
  6016.  
  6017. If an earlier LAN session is still active then the  current  remote  node  name
  6018. field  of  the  command  is examined for presence of a name. If a name is given
  6019. then Kermit asks the user whether to RESUME the session or  start  a  NEW  one.
  6020. Starting a new one results in Kermit hanging up the old session (HANGUP) before
  6021. proceeding; resuming an old one requires no further work at this point.
  6022.  
  6023. When Kermit attaches to the network for the first time it  needs  to  select  a
  6024. unique  local  node  name so that two systems can form a Session by using these
  6025. names as addresses. Kermit uses a simple algorithm to  make  the  name.  Kermit
  6026. probes the network adapter board/software for the name of the local system.  If
  6027. the name is present Kermit makes its own name by appending a dot K (.K) to  the
  6028. local name. If the local name is absent then Kermit first tries a standard name
  6029. of "mskermit.K"; should the network report that the name is not unique (another
  6030. node  is  using the name) then the user is asked to choose a name. This process
  6031. continues until a unique name is obtained or the user decides  to  quit.    The
  6032. final  Kermit  node name is reported on the screen; client Kermits will need to
  6033. know the name of the server Kermit.
  6034.  
  6035. Communication across the LAN begins differently for client and server  Kermits.
  6036. The  server  must  be started first, by simply placing a Kermit in server mode.
  6037. This results in a network Listen request being posted so that arriving  packets
  6038. with  the  correct  node  name  can  be delivered to the server Kermit. Next, a
  6039. client Kermit tries to connect to the server by issuing a Kermit server command
  6040. to  the  proper node name (as given in the client's SET PORT NET node command);
  6041. REMOTE WHO is a satisfactory choice. The client machine actually issues a  net-
  6042. work  Call  to  the server's node name to make a connection and then follows it
  6043. with data packets holding the Kermit server request. The  initial  exchange  of
  6044. packets  establishes a particular virtual circuit between the two nodes. If the
  6045. connection cannot be started then the client Kermit reports this  fact  to  the
  6046. user. The most common causes of a failure at this point are:
  6047.  
  6048.    1. The  client  Kermit  did  not specify the correct server Kermit node
  6049.       name (spelling errors, wrong case for letters, missing dot K),
  6050.  
  6051.    2. One or both machines are using a network adapter board which is  not
  6052.       the first in the machine; Kermit uses only the first board,
  6053.  
  6054.    3. The LAN NetBIOS emulator does not fully support IBM standard virtual
  6055.       circuits,
  6056.  
  6057.    4. The server machine was not started on the network before the client.
  6058.  
  6059. A virtual circuit will be broken if a sender or receiver gets no response to  a
  6060. request  within  a  short  time  interval  set  by  the  LAN hardware/software.
  6061. However, the LAN procedures within Kermit automatically reestablish the circuit
  6062. transparently  to  the user when new information is communicated; the last used
  6063. remote node name is remembered internally for this purpose.   This  also  means
  6064. the  server Kermit will respond to a connection from a new client Kermit if the
  6065. first client is idle for say a minute or so. A session can be terminated by the
  6066. user  by issuing the HANGUP command or by exiting Kermit. A session will not be
  6067. broken this way if the user on the client Kermit changes to  a  regular  serial
  6068. port.
  6069.  
  6070. Finally,  when Kermit returns control to DOS, but not via the PUSH command, its
  6071. unique Kermit node name is removed from the network adapter board.
  6072.  
  6073. During network communications Kermit uses network packets holding 256 bytes  of
  6074. data.  If both Kermits are given the command
  6075.  
  6076.     SET RECEIVE PACKET 1000
  6077.  
  6078. then  the  network  and Kermit will be used to best efficiency.  Experience has
  6079. shown that the client Kermit should have its TIMER OFF because the  server  may
  6080. be  asked  to do an operation via DOS which does not complete before the client
  6081. side would timeout. An observation of some  token  passing  networks  indicates
  6082. that  Kermit  packets slightly longer than 256, 512, etc bytes result in marked
  6083. slowing down because the remaining small piece is not sent until  a  net  timer
  6084. expires.    Carrier  sense (Ethernet, STARLAN) boards seem to be more agressive
  6085. and export small packets immediately.
  6086.  
  6087. Support for the Ungermann-Bass Net/One network, with its NET Command  Interface
  6088. (NETCI), was contributed by Renne Rehmann and Henrik Levkowetz.  In addition to
  6089. the SET PORT NET [nodename] command, which may be  used  to  connect  to  other
  6090. nodes  on  the net with the standard NetBIOS calls, NETCI provides the means to
  6091. connect directly to serial ports on the Ungermann-Bass network.  Use  SET  PORT
  6092. UB-Net1 and enter Connect mode. The NETCI prompt, >>, should appear and all the
  6093. usual NETCI commands (connect, get, list, resume, abandon,  examine,  identify,
  6094. set,  logout, quit) may be selected.  This line is disconnected when Kermit ex-
  6095. its. However, the line may be put on hold, exit Kermit, then later restart Ker-
  6096. mit and give the SET PORT UB-Net1 and CONNECT commands, and Resume the line.
  6097.  
  6098. Some LANs intercept the normal serial port Bios interrupt 14H and masquerade as
  6099. a modem. This service can be engaged within Kermit by the SET PORT  BIOSn  com-
  6100. mand,  where  n  is 1, 2, 3, or 4, as appropriate for the LAN software. To work
  6101. properly the LAN must support the same use of registers  as  the  system  Bios.
  6102. Several  X.25  and TCP/IP packages have been operated successfully with the SET
  6103. PORT BIOSn command. Since this channel appears to Kermit as a  simple  software
  6104. level serial port, Kermit provides neither interrupt driven i/o nor LAN session
  6105. support.
  6106.  
  6107. Kermit can access files on the LAN file server via DOS even while using the LAN
  6108. as  a communications medium.  Network administrators should note this point be-
  6109. cause a user operating Kermit in Server mode can allow his or her  file  server
  6110. directories to be available to other network users also running Kermit, without
  6111. additional security checking of the other users.  The network drives visible to
  6112. the Server Kermit can become devices available for Kermit-to-Kermit file trans-
  6113. fers, etc, unless the DISABLE command is used to confine access to the  current
  6114. disk  and  directory.  A corollary is when files are accessible to DOS commands
  6115. they can become public.
  6116.  
  6117.  
  6118. 1.18.2. Use of Kermit-MS with External Device Drivers
  6119.  
  6120. It is often desirable to supplement or modify the behavior of a DOS program  by
  6121. loading  it with special external device drivers.  These drivers may operate at
  6122. either the DOS or BIOS level.   When  Kermit-MS  accesses  the  BIOS  directly,
  6123. DOS-level drivers are ineffective.  When Kermit accesses the hardware directly,
  6124. both the DOS and the BIOS level  drivers  are  bypassed.    Kermit-MS  provides
  6125. several mechanisms to allow these external drivers to operate as intended.
  6126.  
  6127. Here are a few examples:
  6128.  
  6129.    - IBM's  ANSI.SYS  console driver operates at the DOS level.  It allows
  6130.      the major IBM PC keys to be redefined, and also  interprets  selected
  6131.      ANSI-format  escape  sequences  for screen control.  It works fine at
  6132.      Kermit-MS command level, except SHOW KEY does not  recognize  strings
  6133.      assigned  to  keys  via  ANSI.SYS, and fine at CONNECT level.  To use
  6134.      ANSI.SYS at CONNECT level, issue the Kermit-MS commands SET  KEY  OFF
  6135.      (to  read  keys via DOS) and SET TERMINAL NONE (to display characters
  6136.      through DOS).
  6137.  
  6138.    - Blind people often have speaking  or  Braille  machines  attached  to
  6139.      their  PCs.   DOS-level device drivers are generally used to redirect
  6140.      screen output to these devices, which works OK at  DOS  or  MS-Kermit
  6141.      command level.  SET TERMINAL NONE will allow this redirection to take
  6142.      place during CONNECT.  But  these  devices  also  need  to  have  the
  6143.      computer's  output  appear  as  a  coherent  stream of text, so users
  6144.      should also take care to inform the remote host to format its  output
  6145.      for  a  "dumb"  or hardcopy terminal.  In addition, Kermit-MS' normal
  6146.      file transfer display does not mesh well with these devices, but that
  6147.      can be remedied using SET DISPLAY SERIAL.
  6148.  
  6149.    - People  with motor impairments may be using special keyboard replace-
  6150.      ments supported by DOS-level  device  drivers.    As  with  ANSI.SYS,
  6151.      Kermit-MS  may be directed to use such keyboard drivers with the com-
  6152.      mand SET KEY OFF.
  6153.  
  6154.    - Other keyboard drivers are available that work,  like  Kermit-MS,  at
  6155.      BIOS level.  Examples include ProKey and SuperKey.  These may be used
  6156.      at DOS or Kermit-MS command level as well as during CONNECT.
  6157.  
  6158.    - Conceivably, drivers exist that allow DOS communication  programs  to
  6159.      emulate  terminals  other than ANSI.  You should be able to use them,
  6160.      if they exist, in conjunction with Kermit-MS by telling Kermit to SET
  6161.      TERMINAL NONE, but the speed may not be high because of the interven-
  6162.      ing DOS calls.
  6163.  
  6164.  
  6165. 1.18.3. Kermit-MS/IBM Serial Port Information
  6166.  
  6167. Kermit-MS for IBM PC's and compatibles does testing of serial ports before use.
  6168. This section describes those tests so users may understand what Kermit does.
  6169.  
  6170. When a serial port is selected by the SET PORT COMx command Kermit looks at low
  6171. memory addresses in segment 40H assigned to hold the base address of each  COMx
  6172. port;  COM1 is in word 40:0H, COM2 is in word 40:2H, and so on. If the value in
  6173. the appropriate word is binary zero then Kermit declares the  port  to  be  un-
  6174. available.  Otherwise, Kermit runs read-only (i.e., safe) tests at the base ad-
  6175. dress to validate the presence of an official 8250 UART chip.    If  the  tests
  6176. fail  Kermit  indicates  it  will do i/o through the slow Bios pathway; some PC
  6177. clones need to work this way even though the Bios has speed  problems  even  at
  6178. 1200  baud.  Otherwise, interrupt driven i/o will be done through the 8250 UART
  6179. (that is, very fast).
  6180.  
  6181. There is a special case when a communications board is present, set  for  COM2,
  6182. but a normal COM1 serial port is not.  Kermit detects this situation.
  6183.  
  6184. Many machines now have more than two serial ports, but until recently there has
  6185. been no standard about addresses for COM3 and COM4.  PC DOS 3.30 does  not  as-
  6186. sign  them  either  because  it is really a problem of the system ROM Bios boot
  6187. code run when the power is turned on.  However, Kermit  will  use  COM3  and/or
  6188. COM4  if  the base address of a port is placed in low memory words 40:4H (COM3)
  6189. or 40:6H (COM4); the tests described above are then carried out.  One  restric-
  6190. tion is that the Interrupt ReQuest number (IRQ in the serial port board manual)
  6191. must be either IRQ4 or IRQ3.  Kermit attempts to locate which line  is  correct
  6192. with  a  short  test.   If the test is not successful it uses the IRQ4 for COM3
  6193. (and for COM1) and IRQ3 for COM4 (and for COM2) on the PC/AT, and on  the  PS/2
  6194. it  uses  IRQ3  for COM2, COM3, and COM4.  Check the board and its manual.  DOS
  6195. utility DEBUG can be used to create a short program to insert the  board's  ad-
  6196. dresses into the segment 40H memory locations; a sample program is given below.
  6197.  
  6198. -------------------------------------------------------------------------------
  6199.  
  6200.  
  6201.   Serial Port    Address     IRQ Line         Conventions
  6202.   COM1           03F8H       4                IBM standard
  6203.   COM2           02F8H       3                IBM standard
  6204.   COM3           ?           4 (3 for PS/2)   Board
  6205.   COM4           ?           3                Board
  6206.  
  6207.                  Table 1-13:  IBM PC/XT/AT Serial Port Numbers
  6208.  
  6209. -------------------------------------------------------------------------------
  6210.  
  6211. The  addresses  shown  as  query marks are to be found in the board's reference
  6212. manual; values such as 2E8H and 2E0H would be common.   However,  there  is  no
  6213. standard for anything to do with COM3 and COM4 on non-PS/2's.
  6214.  
  6215. Assuming that you have selected an address in harmony with the rest of the sys-
  6216. tem (good luck on that part), set the board's  switches  or  jumpers,  and  use
  6217. DEBUG  to  insert  the  address(es)  in  segment 40H memory.  The example below
  6218. creates a small program named SETCOM3.COM to put address 02E8H into the  memory
  6219. word  40:04H  for  COM3  and writes the program to drive A. (Disregard the xxxx
  6220. items below):
  6221.  
  6222.     A> DEBUG                        don't type these comments
  6223.     -n a:setcom3.com                sets name of output file
  6224.     -a                              assemble command
  6225.     xxxx:100 mov ax,40              value 40h
  6226.     xxxx:103 mov es,ax              put it into register es
  6227.     xxxx:105 mov ah,02              the 02 part of 02E8H
  6228.     xxxx:107 mov al,e8              the E8 part of same
  6229.     xxxx:109 es:
  6230.     xxxx:10A mov [4],ax             store in 40:4 for com3 ([6] for com4)
  6231.     xxxx:10D int 20                 return to DOS
  6232.     xxxx:10F                        blank line to end assemble mode
  6233.     -r cx                           show contents of register cx
  6234.     CX 0000
  6235.     : 0f                            set register cx to write 0fh bytes
  6236.     -w                              write material to the disk file
  6237.     -q                              quit debug
  6238.     A> DEBUG setcom3.com
  6239.     -u                              unassemble to see if all is well
  6240.     -q                              quit debug
  6241.  
  6242. Note, for COM4, use [6] above rather  than  [4],  and  of  course  employ  your
  6243. board's port address in place of 02E8H (check the manual).  Finally, try it:
  6244.  
  6245.     A> setcom3                      run the program
  6246.     A> DEBUG                        now see what's down there
  6247.     -d 40:00                        display bytes in seg 40H
  6248.  
  6249.            ( Shows many bytes.  See yours?  Good. )
  6250.  
  6251.     -q
  6252.     A>
  6253.  
  6254. A  small side effect noted in practice is the first time the extra port is used
  6255. there may be garbage from it.  Just return to the Kermit prompt and try  again,
  6256. if  necessary  SET  PORT to the other COM lines momentarily, all should be well
  6257. the second time.
  6258.  
  6259. More technical comments, for those with an interest.  When Kermit finishes with
  6260. a  port  it disables interrupts for that serial port and returns the IRQ signal
  6261. line to its state found when Kermit started since many devices  can  share  the
  6262. same  Interrupt ReQuest line but only one device at a time can be active on it.
  6263. If you find that transmissions are good but there is no reception then  another
  6264. device  has  stolen  the IRQ; disable it or find a guru.  Kermit will work with
  6265. non-standard addresses for COM1 and COM2 but the IRQ's must be as in the  table
  6266. above.  Accessing a non-existent port produces a message and all communications
  6267. are discarded safely in the bit bucket.
  6268.  
  6269.  
  6270. 1.18.4. CTTY COMx for IBM Machines
  6271.  
  6272. The DOS command CTTY COMx redirects the standard  input  and  output  from  the
  6273. keyboard and screen, respectively, to the indicated communications channel.  If
  6274. a Kermit Server is operated this way, "through the back port",  then  both  DOS
  6275. and  Kermit can access the port hardware simultaneously; a deadlock develops on
  6276. IBM machines.  The items below refer to only the IBM version of Kermit-MS.
  6277.  
  6278. Kermit-MS/IBM version successfully resolves the deadlock in the following  man-
  6279. ner.  When Kermit requires the serial port it also attaches itself to Interrupt
  6280. 16H, the Bios RS232 serial port routine.  Code within Kermit receives  the  DOS
  6281. serial  port  requests  via  Interrupt 14H and either passes the request to the
  6282. Bios if the COM line is not that used by Kermit or it handles the  request  in-
  6283. ternally  for  conflicting  situations.  When the same port is used by both DOS
  6284. and Kermit, Kermit discards DOS output material (typically a prompt, but  could
  6285. be the dreaded Abort, Retry, Ignore message) and returns a success code to DOS,
  6286. it returns an ascii Backspace code to DOS read requests (this is a key item  to
  6287. keep  DOS  complacent  while  Kermit  communicates),  and it returns reasonable
  6288. status for modem status.  The interception  ceases  when  Kermit  releases  the
  6289. port,  such  as when the Kermit prompt is displayed, and this lets DOS converse
  6290. out the serial port.
  6291.  
  6292. It is worth restating that a large number of programs  bypass  DOS  to  achieve
  6293. higher  performance.  When such programs are started through the back door they
  6294. may still require input from the real keyboard and will hang, waiting  for  it.
  6295. There  is  nothing to do about this situation except a) don't let it happen, b)
  6296. contact the local operator to push some keys.
  6297.  
  6298.  
  6299. 1.18.5. Screen Sizes and the EGA Board, IBM Versions
  6300.  
  6301. Support has been included for Enhanced Graphics  Adapter  (EGA)  video  display
  6302. boards  which  can  be  configured for other than the standard 80 columns by 25
  6303. lines, say 132 columns or 43 lines or other.  Several boards,  the  Tseng  Labs
  6304. EVA (also Orchid Designer) board with the 132 column kit installed, the ATI EGA
  6305. Wonder, the Video 7 Deluxe and VGA, and the  Everex  EV-659  (ega)  and  EV-673
  6306. (vga),  can  be controlled directly by Kermit for 80/132 column changes.  Other
  6307. boards need to be placed in the desired display mode by the user.  Kermit  then
  6308. adapts to the settings if the board obeys standard rules for using the Bios EGA
  6309. memory areas in segment 40H.  The Video-7 boards have been used successfully in
  6310. all  screen  sizes,  including  132  columns by 43 lines, with an NEC Multisync
  6311. monitor.
  6312.  
  6313. The IBM EGA board has several noteworthy bugs which are now standards.  One  is
  6314. the  cursor  dots  are  not always on the correct scan lines when the number of
  6315. screen lines is other than 25.  Kermit-MS attempts to compensate for  this  at-
  6316. tribute.   Screen roll back space is fixed in size so there are fewer pages for
  6317. more dense screens; standard  screens  use  an  internal  buffer,  non-standard
  6318. screens use a buffer plus video page 1. ANSI.SYS is hard coded for 25 line dis-
  6319. plays so all DOS i/o will eventually overwrite itself on line 25; the  emulator
  6320. does  not  use DOS i/o.  Commercial replacements for ANSI.SYS should be able to
  6321. use all screen lines.
  6322.  
  6323. Screen dumps work correctly if done with Kermit commands.  DOS PrintScreen  may
  6324. or may not, depending on your EGA board. Graphics dumps are not managed by Ker-
  6325. mit.
  6326.  
  6327. When the VT102 receives escape sequences to change between 80  and  132  column
  6328. modes  the  screen  is  reset and the ATI EGA Wonder, or Everex EV-659 (EGA) or
  6329. EV-673 (vga), Tseng Labs Multipak (and Orchid Designer), or Video 7 Vega or VGA
  6330. board  is asked to change modes (but only if that board is present); other dis-
  6331. play adapters are left in their current state.  Users of Tseng boards must  run
  6332. the Tseng BIGSCR /R:25 program before starting Kermit.  The right margin is en-
  6333. forced strongly so a board in 132 column mode will not display material to  the
  6334. right  of  column 80 if the emulator is in 80 column mode.  Similarly, material
  6335. to the right of column 80 is not preserved  in  the  emulator  if  the  display
  6336. adapter  is  operating  in  80  column  mode;  real  VT102s keep that invisible
  6337. material in hardware memory whereas the emulator does not.
  6338.  
  6339. Reference is made to line 25 in the emulator; this is normally the  status/mode
  6340. line  in  Kermit.    Real  VT102's  have only 24 line displays.  If the display
  6341. adapter is set for a different number of lines per screen then the 25th line is
  6342. interpreted  to  mean the bottom display adapter line, such as line 43.  Should
  6343. the host access the status/mode line then the line is declared to  be  disabled
  6344. (same  as  SET MODE OFF) so that Kermit's own status information does not over-
  6345. write the host's when the screen is restored.  Toggling a  disabled  mode  line
  6346. has  no  effect;  only SET MODE ON will enable it again.  The Heath-19 terminal
  6347. has the unusual feature that disabling the mode line (ESC y 1) also clears it.
  6348.  
  6349.  
  6350. 1.18.6. Kermit-MS/IBM Printer Control
  6351.  
  6352. The IBM PC MS-Kermit VT102 terminal emulator  also  supports  full  transparent
  6353. printing  of  8-bit  binary  bytes.    The escape sequence "ESC [ 5 i" turns on
  6354. transparent printing, in which all further 8-bit characters are  sent  directly
  6355. to  the  printer, bypassing the SET TRANSLATION INPUT filter, and are not shown
  6356. on the screen.  Escape sequence "ESC [ 4 i" turns off transparent printing  and
  6357. the  escape  sequence  is not sent to the printer.  Non-transparent printing is
  6358. controlled by the "ESC [ ? 5 i" and "ESC [ ? 4 i"  sequences.    Such  printing
  6359. simply  duplicates  text  intended  for the screen, excluding escape sequences.
  6360. The text also appears on the screen.
  6361.  
  6362. Kermit-MS accesses the system printer through DOS calls several  ways;  neither
  6363. the  Bios  nor the hardware are used.  Files directed to the printer by the SET
  6364. DESTINATION PRINTER command are written by opening a file  with  the  name  PRN
  6365. (DOS's  name  for  the  system printer) and writing to it the same as to a disk
  6366. file; DOS provides limited buffering.  LOGging to device  PRN  works  the  same
  6367. way,  as  can be noticed by the last line or so not being printed until the log
  6368. file is CLOSED.  DOS is used again while emulating a terminal in CONNECT  mode.
  6369. If the VT102 emulator found in the IBM PC is used for transparent or Controller
  6370. printing, single characters are written to DOS file handle 4, the DOS  standard
  6371. print  device.   If the screen is echoed to the printer via the typical Control
  6372. PrtSc key combination, or equivalent, single characters are written by the  DOS
  6373. function  05H  Printer  Output  call.   In both cases of terminal emulation the
  6374. printer's ready status is found by the DOS IOCTL 44H call.   Only  the  Control
  6375. PrtSc  case  results  in  the  PRN  message being displayed on the status line.
  6376. Finally, the classical IBM PC Shift PrtSc command to copy the whole  screen  to
  6377. the printer is unknown to Kermit because the system Bios traps the key combina-
  6378. tion and does not tell Kermit about it.  If the Control P command is  given  to
  6379. DOS  before  Kermit  starts then again characters are echoed by the system Bios
  6380. without Kermit's knowledge; this situation can result in lost characters.
  6381.  
  6382. Print spoolers generally operate by being told an existing filename and then in
  6383. the  background  they  steal  cpu  cycles  to  read  from disk and write to the
  6384. printer.  The DOS PRINT command invokes such a spooler.    Although  an  active
  6385. Kermit  does  not  feed these software programs directly the spooler and Kermit
  6386. can compete for cpu cycles and characters can be lost.  If a  non-DOS  resident
  6387. program  intercepts  characters destined for the printer device and spools them
  6388. Kermit does not know about it and similar competion can occur.
  6389.  
  6390. During file transfers printing is carefully sequenced to occur  only  when  the
  6391. local  Kermit  is  in  control of the communications line so that a small pause
  6392. will not result in missing characters arriving at the serial port.   When  ter-
  6393. minal  emulation  is active then printing competes for cpu time with the serial
  6394. port routines.  Generally, the serial port wins such contests if  the  port  is
  6395. interrupt driven (Generic Kermit is not interrupt driven, so beware).  However,
  6396. the printing itself can use enough cpu cycles to delay processing of characters
  6397. to the screen and eventually the receive buffer of the serial port fills to the
  6398. high water mark and an XOFF flow control character  is  sent  to  the  host  to
  6399. suspend  further  transmissions until we send an XON.  If FLOW is NONE then ex-
  6400. pect lost characters at the serial port.  Experience  with  ordinary  IBM  PC's
  6401. through 80386 machines at very high baud rates indicates no characters are lost
  6402. when FLOW is XON/XOFF.  However, it  is  possible  on  some  machines  for  the
  6403. printer  to  have priority over the serial port, and hence to have lost charac-
  6404. ters, especially if a Terminate Stay  Resident  program  intercepts  characters
  6405. destined for the printer and keeps interrupts turned off too long.
  6406. Index
  6407.  
  6408.           -F Command   3, 6
  6409.  
  6410.           .BOO Files   27
  6411.           .PIF Files   4
  6412.  
  6413.           132 Column Mode   35
  6414.  
  6415.           7171   24
  6416.  
  6417.           Alarm   15
  6418.           ANSI Printer Control   35
  6419.           ANSI.SYS     5, 6, 17, 18, 19,
  6420.                   26, 35
  6421.           ASCII   5
  6422.           ASSIGN   21
  6423.           Asynchronous     Communication
  6424.                   Server   4
  6425.           ATI EGA Wonder   35
  6426.           Attributes   11, 15
  6427.           Autoanswer Modem   13
  6428.           AUTOEXEC.BAT   4
  6429.  
  6430.           Backslash Number Format   5
  6431.           Batch  Operation  of Kermit-MS
  6432.                   4
  6433.           Baud Rate   2, 19
  6434.           Bell   15
  6435.           Binary Files   3, 11, 17
  6436.           BIOS   33
  6437.           Bios LAN   34
  6438.           Blind   8, 15, 34
  6439.           Block Check   15
  6440.           BOO Files   27
  6441.           Bootstrapping  MS-DOS   Kermit
  6442.                   27
  6443.  
  6444.           Cancelling   a  File  Transfer
  6445.                   11, 12
  6446.           Checksum   15
  6447.           CLOSE Command   14
  6448.           Code Page   26, 29
  6449.           COM3 and COM4   18, 34
  6450.           Command Files   19
  6451.           Command Macro   21
  6452.           COMMENT Command   6
  6453.           Completion   3, 5
  6454.           Concurrent DOS   4
  6455.           CONFIG.SYS   4
  6456.           CONNECT Command   8
  6457.           Control-X,-Z   11, 12
  6458.           Count   15
  6459.           CRC   15
  6460.           CTTY   4, 18, 26
  6461.  
  6462.           Debugging   15
  6463.           DEFINE   21
  6464.           DG/1   1
  6465.           DIAL Command   21
  6466.           Display, File Transfer     15,
  6467.                   34
  6468.           DO Command   21
  6469.           Dump Screen   9, 16
  6470.  
  6471.           ECHO Command   6
  6472.           EGA Boards   35
  6473.           Eighth-Bit Prefix   17
  6474.           End Of File   3, 16
  6475.           ERRORLEVEL   4, 16
  6476.           Escape  Character  for CONNECT
  6477.                   8, 16
  6478.           Everex EV-659   35
  6479.           EXEPACK   1
  6480.  
  6481.           File Attributes   11
  6482.           File Warning   20
  6483.           Flow Control   16, 35
  6484.  
  6485.           Generic MS-DOS Kermit   18, 28
  6486.           German   20
  6487.           GOTO Command   23
  6488.           Graphics   9, 32
  6489.           Graphics Screen Capture   32
  6490.  
  6491.           Handicapped   15, 34
  6492.           Handshake   16
  6493.           HANGUP   8
  6494.           Heath/Zenith-19 Emulation   29
  6495.           Hebrew   25
  6496.           Help   4
  6497.  
  6498.           IBM Mainframe   24
  6499.           IBM PC Family   1
  6500.           IF Command   23
  6501.           Incomplete  File   Disposition
  6502.                   12, 16
  6503.           INPUT Command   16, 17, 22
  6504.           International Characters   25
  6505.  
  6506.           Japanese   2
  6507.  
  6508.           Kana, Kanji   2
  6509.           Key Redefinition   16
  6510.  
  6511.           Labels   23
  6512.           LAN   4
  6513.           Local Area Network   4, 13
  6514.           Local Echo   8, 17
  6515.           LOG Command   14
  6516.           LOG PACKETS   14
  6517.           LOG SESSION   12
  6518.           LOG TRANSACTION   14
  6519.           Long Packets   18
  6520.  
  6521.           Macro   21
  6522.           MAIL Command   14
  6523.           MASM   28
  6524.           Menu   5
  6525.           Mode Line   8, 17
  6526.           Modem   2, 6, 8, 20, 24
  6527.           MS-DOS   1
  6528.           MS-Windows   1, 4
  6529.           MSKERMIT.INI     3, 6, 16, 17,
  6530.                   19, 24
  6531.  
  6532.           National Characters   5, 8, 16
  6533.           NEC APC3   26
  6534.           NetBIOS   4, 18, 33
  6535.           Network   4
  6536.           Network security   13, 34
  6537.           Novell   33
  6538.  
  6539.           OUTPUT Command   22
  6540.  
  6541.           Parity   12, 17, 22
  6542.           PATH   2, 3, 4, 6, 7, 11
  6543.           PC-DOS   1
  6544.           POP   6
  6545.           POP Command   23
  6546.           Printer   8, 9, 12, 15, 17, 35
  6547.           ProKey   17
  6548.           Protocol Converter   24
  6549.           PUSH Command   6
  6550.  
  6551.           Rainbow   26
  6552.           RAM Disk   4, 11
  6553.           RECEIVE Command   11
  6554.           Redirected  input  and  output
  6555.                   3
  6556.           REINPUT Command   22
  6557.           Rollback   9
  6558.  
  6559.           Screen Dump   9, 16
  6560.           Screen Rollback   9
  6561.           Script Files   22
  6562.           Security   13, 34
  6563.           SEND Command   11
  6564.           Server   12
  6565.           SET PORT NETBIOS   4, 18
  6566.           SET PORT UB-NET1   4, 18
  6567.           SET TERMINAL   19
  6568.           Speaking Device   15
  6569.           Speed   19
  6570.           Starlan   33
  6571.           STAY   3
  6572.           STAY Command   6
  6573.           STOP   6
  6574.           STOP Command   23
  6575.           SuperKey   17
  6576.  
  6577.           Tab Stops   20
  6578.           Tektronix   9, 19, 32
  6579.           Telenet   17
  6580.           Terminal Emulation   1, 8
  6581.           Terminal Settings   19
  6582.           Timeout   20
  6583.           Token Ring   33
  6584.           TopView   1
  6585.           TRANSLATION   20
  6586.           TRANSMIT   12
  6587.           Tseng Labs Multipak   35
  6588.  
  6589.           UART   1
  6590.           Ungermann  Bass  Net  One  LAN
  6591.                   34
  6592.           Ungermann-Bass   4, 34
  6593.  
  6594.           Variables, substitution   21
  6595.           VERSION   5
  6596.           Video 7 Vega   35
  6597.           VT102 Emulation   1, 19, 29
  6598.           VT52 Emulation   29
  6599.  
  6600.           Warning   20
  6601.           Wildcard   2, 11
  6602.  
  6603.           Xmodem   27
  6604.           XON/XOFF   1, 12, 16
  6605.           XSEND   11
  6606.  
  6607.                                Table of Contents
  6608.  
  6609. 1. MS-DOS KERMIT                                                              1
  6610.  
  6611.    1.1. System Requirements                                                   1
  6612.    1.2. History                                                               1
  6613.    1.3. Using MS-Kermit                                                       2
  6614.    1.4. The MS-DOS File System                                                2
  6615.        1.4.1. File Specifications                                             2
  6616.        1.4.2. File Formats                                                    3
  6617.    1.5. Program Setup and Invocation                                          3
  6618.    1.6. Kermit-MS Commands                                                    4
  6619.        1.6.1. Program Management Commands                                     5
  6620.        1.6.2. Local File Management Commands                                  6
  6621.        1.6.3. COMMANDS FOR TERMINAL CONNECTION                                8
  6622.        1.6.4. COMMANDS FOR FILE TRANSFER                                     11
  6623.        1.6.5. Hints for Transferring Large Files                             12
  6624.        1.6.6. Commands for Raw Uploading and Downloading                     12
  6625.        1.6.7. Kermit Server Commands                                         12
  6626.        1.6.8. Commands for Controlling Remote Kermit Servers                 13
  6627.        1.6.9. The LOG and CLOSE Commands                                     14
  6628.        1.6.10. The SET Command                                               15
  6629.        1.6.11. The STATUS and SHOW Commands                                  20
  6630.    1.7. Macros                                                               20
  6631.    1.8. SCRIPTS                                                              22
  6632.    1.9. Initialization Files Revisited                                       24
  6633.    1.10. International Character Sets                                        25
  6634.    1.11. MS-Kermit Features for Different Systems                            26
  6635.    1.12. Compatibility with Older Versions of MS-DOS Kermit                  27
  6636.    1.13. What's Missing                                                      27
  6637.    1.14. Installation of Kermit-MS                                           27
  6638.    1.15. Program Organization                                                28
  6639.    1.16. Bringing Kermit to New Systems                                      28
  6640.    1.17. Kermit-MS VT102 Terminal Emulator Technical Summary                 29
  6641.        1.17.1. Treatment of Inbound Characters During Terminal Emulation     29
  6642.        1.17.2. Keyboard Layout and Characters Sent                           30
  6643.        1.17.3. Responses To Characters Received By the Terminal Emulator     30
  6644.        1.17.4. DEC VT102 Functions While in VT52 Mode                        31
  6645.        1.17.5. Heath-19 Functions While in Non-ANSI Mode                     31
  6646.        1.17.6. Heath-19 Functions While in ANSI Mode                         31
  6647.        1.17.7. Tektronix 4010/4014 Graphics Terminal Functions               32
  6648.    1.18. IBM PC Kermit Technical Summaries                                   33
  6649.        1.18.1. Kermit-MS/IBM on Local Area Networks                          33
  6650.        1.18.2. Use of Kermit-MS with External Device Drivers                 34
  6651.        1.18.3. Kermit-MS/IBM Serial Port Information                         34
  6652.        1.18.4. CTTY COMx for IBM Machines                                    35
  6653.        1.18.5. Screen Sizes and the EGA Board, IBM Versions                  35
  6654.        1.18.6. Kermit-MS/IBM Printer Control                                 35
  6655.  
  6656. Index                                                                        36
  6657.  
  6658.                                 List of Figures
  6659.  
  6660.    Figure 1-1:   MS-Kermit File Transfer Display Screen                      11
  6661.    Figure 1-2:   MS-Kermit Script for Logging In                             24
  6662.    Figure 1-3:   MS-Kermit Script for More Control of a Hayes 2400 bps       24
  6663.                  Modem
  6664.    Figure 1-4:   MS-DOS Batch File Invoking Kermit to Send VAX Mail          24
  6665.    Figure 1-5:   MS-Kermit Script for Logging into VAX and Sending Mail      25
  6666.    Figure 1-6:   An Advanced MS-Kermit Initialization File                   25
  6667.  
  6668.                                 List of Tables
  6669.  
  6670.    Table 1-1:   MS-DOS Kermit Backslash Codes                                 5
  6671.    Table 1-2:   The US ASCII Character Set (ANSI X3.4-1977)                   5
  6672.    Table 1-3:   RS-232-C Modem Signals                                        8
  6673.    Table 1-4:   Kermit-MS Single-Character CONNECT Escape Commands            9
  6674.    Table 1-5:   Adapters Supported by IBM PC MS-Kermit for Tektronix         10
  6675.                 Emulation
  6676.    Table 1-6:   Kermit-MS Verbs for the IBM PC Family                        17
  6677.    Table 1-7:   Kermit-MS Terminal Emulation Options                         26
  6678.    Table 1-8:   Kermit-MS Screen Scroll Keys                                 26
  6679.    Table 1-9:   Kermit-MS Verbs for the DEC Rainbow                          26
  6680.    Table 1-10:   Response of MS-Kermit Tektronix Emulator to Received        32
  6681.                  Characters
  6682.    Table 1-11:   Tektronix Dot-Drawing Commands                              32
  6683.    Table 1-12:   MS-Kermit Tektronix Coordinate Interpretation               33
  6684.    Table 1-13:   IBM PC/XT/AT Serial Port Numbers                            34
  6685.